Thread View: borland.public.vdbase.data.sql
3 messages
3 total messages
Started by Danielle
Tue, 02 Mar 1999 00:00
creating sql indexes
Author: Danielle
Date: Tue, 02 Mar 1999 00:00
Date: Tue, 02 Mar 1999 00:00
18 lines
1015 bytes
1015 bytes
i have an sql server, with a database on it. in my BDE i have an alias for the database. I am trying to create an index on one of the tables on the server in a .prg but whenever i try to create it, the .prg always looks for the table on the f:\ drive not on the database on the server. Can anyone help me with this? Here is a sample of my code. myDB = new Database() myDB.databaseName = "WinDB" myDB.active = true myQ = new Query() myQ.database = myDB myQ.sql = 'select * from invent' myQ.active = true create index temp on invent (descrip) thanks kris
Re: creating sql indexes
Author: Gary Gary White
Date: Tue, 02 Mar 1999 00:00
Date: Tue, 02 Mar 1999 00:00
34 lines
1329 bytes
1329 bytes
On Tue, 2 Mar 1999 10:59:51 -0500, Danielle wrote: > myDB = new Database() > myDB.databaseName = "WinDB" > myDB.active = true > > myQ = new Query() > myQ.database = myDB > myQ.sql = 'select * from invent' > myQ.active = true > > create index temp on invent (descrip) CREATE INDEX is a local SQL command. It doesn't know what your data objects are. Get Ken's paper on Undocumented features from his web site. It discusses some ways to do this using OODML. OTH, if you want to use XDML, you can try: use :WinDB:invent exclusive index on descrip tag temp Or, if you want to use local SQL: set database to WinDB create index temp on invent descrip Isn't it wonderful how VdB gives you so many ways to accomplish things. <G> Gary White Some dBASE Stuff at http://www.AppTools.com/dbase
Re: creating sql indexes
Author: Romain Strieff [TeamB]
Date: Tue, 02 Mar 1999 00:00
Date: Tue, 02 Mar 1999 00:00
27 lines
1336 bytes
1336 bytes
In article <7bh1qc$sl712@forums.borland.com>, Danielle politely
paraphrased ...
> i have an sql server, with a database on it. in my BDE i have an alias for
> the database. I am trying to create an index on one of the tables on the
> server in a .prg but whenever i try to create it, the .prg always looks for
> the table on the f:\ drive not on the database on the server. Can anyone
> help me with this? Here is a sample of my code.
>
> myDB = new Database()
> myDB.databaseName = "WinDB"
> myDB.active = true
>
> myQ = new Query()
> myQ.database = myDB
> myQ.sql = 'select * from invent'
> myQ.active = true
>
> create index temp on invent (descrip)
>
>
MydB.ExecuteSQL("create index temp on invent (descrip)")
--
Romain Strieff [TeamB]
Please read this newsgroup guide below before
posting on the private Inprise newsgroups.
http://www.inprise.com/newsgroups/guide.html
--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads