Board index » delphi » MSSQL 7.0 dbo and Indexes
Orre
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
Orre
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
MSSQL 7.0 dbo and Indexes
I am porting an App from Paradox to MS SQL 7.0 and found that when trying to
open a table in MSSQL and do a 'Findkey' on it I am getting a message stating that the dataset is not indexed. My code relied on the Primary key being the default index. SO, i wrote a little app to test things out on MSSQL and found that it does Thanks, |
Orre
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesMy app currently relies too heavily on the findkey at this point to remove it....I also plan on allowing for MSSQL or Paradox to run the app. I may go ahead and do what your suggesting...but my first step is working with what I got. Thanks for the advice, I will search the groups for tips. Quotecbaugh wrote in message <86i8hq$n...@bornews.borland.com>... |
cbaug
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesMuch better advise it to toss out your findkey and use a tquery with a where clause. Search the groups for a lot of "tips" on what to do and what not to do when coming from Paradox. Craig Baugh QuoteOrren <Orren.grush...@goldmanmarcus.com> wrote in message news:86i08v$ms614@bornews.borland.com... |
Bradford C. Mille
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesWell you could do something where you toggle the code that gets executed based on which database they are running. However, I agree with the previous poster. If you keep you TTables and try to use MSSQL (or any SQL based RDBMS), your performance will suck and you will have a lot of unhappy, unsatisfied customers. BTW, the DataSet.Locate will do a lot of what I think FindKey does for you in a ttable enviroment, so switching might not be too bad after all... QuoteOrren wrote: |
cbaug
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesPlease, please don't do it. I can't stress it enough. I've seen apps that ran faster on paradox tables then on sql tables for the exact reason of what you are doing. If your app can run on both sql server and paradox tables, well I imagine that scalability will be close to 0%. Think about what happens when you do a findkey on paradox. You have the table opened to that index, and you scan on it. Now, do that on sql server, get ready to bring all of the records down. And I'm sure you are using ttables, the number one gotcha all time of killing sql server performance. Stop and scan these newsgroups before you go further. You'll thank me once you stop cursing at me:).. Craig Baugh QuoteOrren <Orren.grush...@goldmanmarcus.com> wrote in message news:86i90b$n425@bornews.borland.com... |
Jamie Burk
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesWell if you absolutely *have* to do it this way, I'd recommend creating a TTable descendant and having it automatically fix the table name to add the dbo. prefix if it's not already there. Jamie Quote"Orren" <Orren.grush...@goldmanmarcus.com> wrote in message Quote> My app currently relies too heavily on the findkey at this point to remove |
Orre
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesI scanned through many of the C/S tips, printed them, memorized them and had them framed and yes I am scared. The application won't be using both Paradox and SQL at the same time (just to be clear), it will use one or the other depending on user preferences etc. So I am on a tricky tightrope here...my first priority is to get it to work with minimal changes. Do some testing and then modify as needed. And from what everyone is telling me is that it will be significant changes...but first baby steps. Thanks for all the suggestions and tips. I thought there was a setting Thanks again. Quotecbaugh wrote in message <86ij0e$n...@bornews.borland.com>... |
Mauricio Castr
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesYou only define the primarykey property into database bat not the index and the findkey use the index define it using create index and all your problems are finished Orren escribi en mensaje <86i08v$ms...@bornews.borland.com>... Quote>I am porting an App from Paradox to MS SQL 7.0 and found that when trying |
cbaug
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesI wish you luck. I think if you will reread the newsgroups you will find that the idea of a toggle in your code is a rather poor idea. I earlier posted a list of what I have found (from experience, talking to others and these newsgroups) my top ten list for C/S development. I believe you'll find that most of these you will be in violation of. And if you spend enough time to truly find a way to "flip a switch", you will find that it would have been far easier to simply have two completely different products up front. And again, I apologize if I'm being unfriendly, I'm really trying to point you in the direction of understanding the differences between a paradox app and a good c/s app. HTH, Craig Baugh QuoteOrren <Orren.grush...@goldmanmarcus.com> wrote in message news:86kqqd$ond15@bornews.borland.com... |
Peter Da
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesCraig, Sorry, do you mind to email me your top ten tips or to point out where I can Thanks Peter Dam Quotecbaugh <cba...@home.com> wrote in message Quote> I wish you luck. I think if you will reread the newsgroups you will find Quote> direction of understanding the differences between a paradox app and a Quote> > I scanned through many of the C/S tips, printed them, memorized them and |
cbaug
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesNo problem. I'll repost them since I've made a few changes. I should add the caveat that this is based on BDE usage. I'm working to put one together for ADO usage. ********* I'm sure many will disagree (and already have) but it's good food for thought. Regards, Craig Baugh QuotePeter Dam <p...@tesco.net> wrote in message news:86sd8c$t4r12@bornews.borland.com... |
Mauricio Castr
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesOrren I was the same problem that yoo and application developed into paradox using Findkey Master/Detail and IndexFieldNames; and I defined the same structure in the server and define and SchemaCacheDir in Alias BDE do all the test possible and run my application. cbaugh escribi en mensaje <86sf0g$t...@bornews.borland.com>... Quote>No problem. I'll repost them since I've made a few changes. I should Quote>server. Quote>datasets.) Quote>alias" - Hide quoted text - - Show quoted text - Quote>> Craig, |
Peter Da
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesThanks for the top eigh{*word*249} list. I find it extremely useful for me - a new comer to client/server programming area. Any tips for MS SQL7.0 using both BDE and ADOExpress? Peter Quotecbaugh <cba...@home.com> wrote in message Quote> No problem. I'll repost them since I've made a few changes. I should Quote> server. Quote> datasets.) Quote> alias" - Hide quoted text - - Show quoted text - Quote> > Craig, |
Orre
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesThank you, I will give it a shot! QuoteMauricio Castro wrote in message <86ktkt$on...@bornews.borland.com>... |
Orre
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:MSSQL 7.0 dbo and IndexesWell I gave it a shot, it didn't seem to help. Maybe I have the syntax wrong. I am creating a table as follows: CREATE TABLE table1 Is this the way you are suggesting ? Thanks. QuoteMauricio Castro wrote in message <86ktkt$on...@bornews.borland.com>... |