Board index » delphi » Help search & Set ADO Indexes in MS SQL.

Help search & Set ADO Indexes in MS SQL.


2004-10-08 12:55:45 AM
delphi163
Im trying to open up a MS SQL Table and use the indexes for Searching.
i keep getting this error...
'Current Provider The Does not Support the Necessary Interface for Index
Functionability'
ADOConnection1.ConnectionString := 'Provider=SQLOLEDB.1;Persist Security
Info=False;' + 'Initial Catalog='+ sDbName + ';Data Source=' + sSQLServer +
';User ID=sa' + // mssa + ';Password=####';
How I search an MS SQL table based on indexes.
I guess Setkey doesn't work ??
Help
Brn Costello - MS
 
 

Re:Help search & Set ADO Indexes in MS SQL.

That is right, OLEDB provider for MS SQL Server does not support indeces. Of
course, MS SQL Server uses indeces when optimizing query and creating
execution plans. You may use Locate() instead.
//------------------------------------------
Regards,
Vassiliev V. V.
www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"BCostello" <XXXX@XXXXX.COM>сообщи?сообщила ?новостях следующе?
Quote
Im trying to open up a MS SQL Table and use the indexes for Searching.
i keep getting this error...

'Current Provider The Does not Support the Necessary Interface for Index
Functionability'

ADOConnection1.ConnectionString := 'Provider=SQLOLEDB.1;Persist Security
Info=False;' + 'Initial Catalog='+ sDbName + ';Data Source=' + sSQLServer
+
';User ID=sa' + // mssa + ';Password=####';

How I search an MS SQL table based on indexes.
I guess Setkey doesn't work ??

Help

Brn Costello - MS


 

Re:Help search & Set ADO Indexes in MS SQL.

Hi Thanks for the reply...
i guess i can use locate for searching,but how do I set sort order
dyamically?
adoTable1.indexname:= ????
"Viatcheslav V. Vassiliev" <XXXX@XXXXX.COM>writes
Quote
That is right, OLEDB provider for MS SQL Server does not support indeces.
Of
course, MS SQL Server uses indeces when optimizing query and creating
execution plans. You may use Locate() instead.

//------------------------------------------
Regards,
Vassiliev V. V.
www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"BCostello" <XXXX@XXXXX.COM>сообщи?сообщила ?новостях
следующе?
news:XXXX@XXXXX.COM...
>Im trying to open up a MS SQL Table and use the indexes for Searching.
>i keep getting this error...
>
>'Current Provider The Does not Support the Necessary Interface for Index
>Functionability'
>
>ADOConnection1.ConnectionString := 'Provider=SQLOLEDB.1;Persist Security
>Info=False;' + 'Initial Catalog='+ sDbName + ';Data Source=' +
sSQLServer
+
>';User ID=sa' + // mssa + ';Password=####';
>
>How I search an MS SQL table based on indexes.
>I guess Setkey doesn't work ??
>
>Help
>
>Brn Costello - MS
>
>


 

Re:Help search & Set ADO Indexes in MS SQL.

Thanks for the email..
Still NG...
This is what I have
tbIV90100.IndexFieldNames:='LeaseNo';
tbIV90100.Open;
tbIV90100.first;
tbIV90100.GetIndexNames(Combobox1.items);
//It never changes the sort order...
How doI change the sort order from time to time??
Do I specifyand create an index in SQL??
Thanks...
"Brian Bushay TeamB" <XXXX@XXXXX.COM>writes
Quote

>Hi Thanks for the reply...
>i guess i can use locate for searching,but how do I set sort order
>dyamically?
>adoTable1.indexname:= ????

see AdoTable.indexFieldnames property
--
Brian Bushay (TeamB)
XXXX@XXXXX.COM