Thread View: borland.public.cppbuilder.database.ado
3 messages
3 total messages
Started by Foo Tze Wan
Fri, 19 Aug 2005 10:08
"Index does not exists" error
Author: Foo Tze Wan
Date: Fri, 19 Aug 2005 10:08
Date: Fri, 19 Aug 2005 10:08
35 lines
2131 bytes
2131 bytes
Hi all,
I am using the following provider : MS OLE DB Provider for ODBC Drivers, to
connect to InterBase.
I read in a previous posting that indexes are not supported in the provider
for SQLServer.
This prompted me to find out if the above provider I used supports Indexes
too. When I set the table to active in the code below, ADOTable_FPUser (a
TADOTable) returns an exception - "Index does not exists". (See arrow
pointer in the code below).
What I wanted to do was to search a table (using the Seek function) for a
specific user ID (1234 in this example). I have double-checked that the
table name and index name are correct (hopefully).
Code Snippet:
{
ADOConnectionExternal->Connected = true;
ADOTable_FPUser->Connection = ADOConnectionExternal;
ADOTable_FPUser->TableDirect = true;
ADOTable_FPUser->TableName = "FPUSER";
ADOTable_FPUser->IndexName = "FPUSER_USERIDSTR";
ADOTable_FPUser->CursorLocation = clUseServer;
ADOTable_FPUser->Active = true; // <--- Error happens here.
ADODataSet_FPUser->Seek("1234", soAfterEQ);
}
Does anyone have any idea? Or have I left out anything? Thank you.
Regards,
Tze Wan
Re: "Index does not exists" error
Author: Viatcheslav V. Vassiliev
Date: Fri, 19 Aug 2005 14:31
Date: Fri, 19 Aug 2005 14:31
54 lines
2997 bytes
2997 bytes
I do not known OLEDB provider other than MS Jet that supports Seek. AFAIK,
Interbase/Firebird support only forward-only datasets in their API, so using
Seek needs cache of rows implemented somewhere. Use client-side cursor and
Locate if you have not much data, or execute query with WHERE ID = 1234.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Foo Tze Wan" <twfoo@nospam.com> �������/�������� � �������� ���������:
news:4305af80@newsgroups.borland.com...
> Hi all,
>
> I am using the following provider : MS OLE DB Provider for ODBC Drivers,
> to
> connect to InterBase.
>
> I read in a previous posting that indexes are not supported in the
> provider
> for SQLServer.
>
> This prompted me to find out if the above provider I used supports Indexes
> too. When I set the table to active in the code below, ADOTable_FPUser (a
> TADOTable) returns an exception - "Index does not exists". (See arrow
> pointer in the code below).
>
> What I wanted to do was to search a table (using the Seek function) for a
> specific user ID (1234 in this example). I have double-checked that the
> table name and index name are correct (hopefully).
>
> Code Snippet:
> {
> ADOConnectionExternal->Connected = true;
>
> ADOTable_FPUser->Connection = ADOConnectionExternal;
> ADOTable_FPUser->TableDirect = true;
> ADOTable_FPUser->TableName = "FPUSER";
> ADOTable_FPUser->IndexName = "FPUSER_USERIDSTR";
> ADOTable_FPUser->CursorLocation = clUseServer;
> ADOTable_FPUser->Active = true; // <--- Error happens here.
>
> ADODataSet_FPUser->Seek("1234", soAfterEQ);
> }
>
> Does anyone have any idea? Or have I left out anything? Thank you.
>
> Regards,
> Tze Wan
>
>
Re: "Index does not exists" error
Author: Foo Tze Wan
Date: Tue, 23 Aug 2005 09:35
Date: Tue, 23 Aug 2005 09:35
23 lines
1828 bytes
1828 bytes
Thanks Viatcheslav, for your insight. Will also read up on "forward-only" datasets to understand more. I have posted yet another question on blob fields... Regards, Tze Wan "Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message news:4305ed48$1@newsgroups.borland.com... I do not known OLEDB provider other than MS Jet that supports Seek. AFAIK, Interbase/Firebird support only forward-only datasets in their API, so using Seek needs cache of rows implemented somewhere. Use client-side cursor and Locate if you have not much data, or execute query with WHERE ID = 1234. //------------------------------------------ Regards, Vassiliev V. V. http://www.managed-vcl.com - using .Net objects in Delphi for Win32 + ADO.Net http://www.oledbdirect.com - The fastest way to access MS SQL Server, MS Jet (Access) and Interbase (through OLEDB)
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