|
-
Seek command not yet supported?
I have been using the ado v.2.6 and noticed that SEEK and INDEX are not yet
supported, however, curiously enough, they are listed as valid property functions.
Could you clarify when these will be available?
I tried using a connection like
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Program Files\Microsoft Visual Studio\VB98\BIBLIO32.MDB;"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select Comments,Description,ISBN,Notes,PubID,Subject,Title,[Year
Published] from Titles", db, adOpenStatic, adLockOptimistic
then when testing for support
If adoPrimaryRS.Supports(adIndex) And adoPrimaryRS.Supports(adSeek) Then
adoPrimaryRS.Index = "PubID"
End If
----> this function will return FALSE as adSeek and adIndex are not supported
adoPrimaryRS.Seek "PubID = " & vValue
-----> will return error message "3251 Object or Provider not capable of
performing requested operation"
I understand that this function SEEK AND INDEX where never supported at all
by ADO
Any ideas?
-
Re: Seek command not yet supported?
Here is another piece of code i tested with similar results.
'BeginSeekVB
Public Sub SeekX()
Dim rst As ADODB.Recordset
Dim strID As String
Dim strPrompt As String
strPrompt = "Enter an EmployeeID (e.g., 0 to 9)"
Set rst = New ADODB.Recordset
rst.CursorLocation = adUseServer
rst.Open "employees", _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=E:\Program Files\Microsoft Office\Office\Samples\northwind.mdb;"
& _
"user id=admin;password=;", _
adOpenKeyset, adLockReadOnly, adCmdTableDirect
' Does this provider support Seek and Index?
If rst.Supports(adIndex) And rst.Supports(adSeek) Then
rst.Index = "PrimaryKey"
' Display all the employees.
rst.MoveFirst
Do While rst.EOF = False
Debug.Print rst!EmployeeId; ": "; rst!firstname; " "; _
rst!LastName
rst.MoveNext
Loop
' Prompt the user for an EmployeeID between 0 and 9.
rst.MoveFirst
Do
strID = LCase(Trim(InputBox(strPrompt, "Seek Example")))
' Quit if strID is a zero-length string (CANCEL, null, etc.)
If Len(strID) = 0 Then Exit Do
If Len(strID) = 1 And strID >= "0" And strID <= "9" Then
rst.Seek Array(strID), adSeekFirstEQ
If rst.EOF Then
Debug.Print "Employee not found."
Else
Debug.Print strID; ": Employee='"; rst!firstname; " "; _
rst!LastName; "'"
End If
End If
Loop
End If
rst.Close
End Sub
'EndSeekVB
"Fred" <evansfr@ramgroup.com> wrote:
>
>I have been using the ado v.2.6 and noticed that SEEK and INDEX are not
yet
>supported, however, curiously enough, they are listed as valid property
functions.
>Could you clarify when these will be available?
>
>I tried using a connection like
>
>db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
> "Data Source=C:\Program Files\Microsoft Visual Studio\VB98\BIBLIO32.MDB;"
> Set adoPrimaryRS = New Recordset
> adoPrimaryRS.Open "select Comments,Description,ISBN,Notes,PubID,Subject,Title,[Year
>Published] from Titles", db, adOpenStatic, adLockOptimistic
>
>then when testing for support
>
>If adoPrimaryRS.Supports(adIndex) And adoPrimaryRS.Supports(adSeek) Then
> adoPrimaryRS.Index = "PubID"
>End If
>
>----> this function will return FALSE as adSeek and adIndex are not supported
>
>adoPrimaryRS.Seek "PubID = " & vValue
>-----> will return error message "3251 Object or Provider not capable of
>performing requested operation"
>
>I understand that this function SEEK AND INDEX where never supported at
all
>by ADO
>
>Any ideas?
-
Re: Seek command not yet supported?
The seek is only supported on Jet 4.0 databases with the Jolt 4.0 provider
supplied with ADO 2.5.
bv
"Fred" <evansfr@ramgroup.com> wrote:
>
>I have been using the ado v.2.6 and noticed that SEEK and INDEX are not
yet
>supported, however, curiously enough, they are listed as valid property
functions.
>Could you clarify when these will be available?
>
>I tried using a connection like
>
>db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
> "Data Source=C:\Program Files\Microsoft Visual Studio\VB98\BIBLIO32.MDB;"
> Set adoPrimaryRS = New Recordset
> adoPrimaryRS.Open "select Comments,Description,ISBN,Notes,PubID,Subject,Title,[Year
>Published] from Titles", db, adOpenStatic, adLockOptimistic
>
>then when testing for support
>
>If adoPrimaryRS.Supports(adIndex) And adoPrimaryRS.Supports(adSeek) Then
> adoPrimaryRS.Index = "PubID"
>End If
>
>----> this function will return FALSE as adSeek and adIndex are not supported
>
>adoPrimaryRS.Seek "PubID = " & vValue
>-----> will return error message "3251 Object or Provider not capable of
>performing requested operation"
>
>I understand that this function SEEK AND INDEX where never supported at
all
>by ADO
>
>Any ideas?
-
Re: Seek command not yet supported?
Bill
I use Microsoft.Jet.OLEDB.4.0 as the provider quering an Ms Access 2000 db.
Could you explain about this JOLT provider?
"Bill Vaughn" <billva@microsoft.com> wrote:
>
>The seek is only supported on Jet 4.0 databases with the Jolt 4.0 provider
>supplied with ADO 2.5.
>
>bv
>"Fred" <evansfr@ramgroup.com> wrote:
>>
>>I have been using the ado v.2.6 and noticed that SEEK and INDEX are not
>yet
>>supported, however, curiously enough, they are listed as valid property
>functions.
>>Could you clarify when these will be available?
>>
>>I tried using a connection like
>>
>>db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
>> "Data Source=C:\Program Files\Microsoft Visual Studio\VB98\BIBLIO32.MDB;"
>> Set adoPrimaryRS = New Recordset
>> adoPrimaryRS.Open "select Comments,Description,ISBN,Notes,PubID,Subject,Title,[Year
>>Published] from Titles", db, adOpenStatic, adLockOptimistic
>>
>>then when testing for support
>>
>>If adoPrimaryRS.Supports(adIndex) And adoPrimaryRS.Supports(adSeek) Then
>> adoPrimaryRS.Index = "PubID"
>>End If
>>
>>----> this function will return FALSE as adSeek and adIndex are not supported
>>
>>adoPrimaryRS.Seek "PubID = " & vValue
>>-----> will return error message "3251 Object or Provider not capable of
>>performing requested operation"
>>
>>I understand that this function SEEK AND INDEX where never supported at
>all
>>by ADO
>>
>>Any ideas?
>
-
Re: Seek command not yet supported?
Jolt is the codename for the OLE DB Jet providers.
"Fred" <evansfr@ramgroup.com> wrote:
>
>Bill
>I use Microsoft.Jet.OLEDB.4.0 as the provider quering an Ms Access 2000
db.
>Could you explain about this JOLT provider?
>
>"Bill Vaughn" <billva@microsoft.com> wrote:
>>
>>The seek is only supported on Jet 4.0 databases with the Jolt 4.0 provider
>>supplied with ADO 2.5.
>>
>>bv
>>"Fred" <evansfr@ramgroup.com> wrote:
>>>
>>>I have been using the ado v.2.6 and noticed that SEEK and INDEX are not
>>yet
>>>supported, however, curiously enough, they are listed as valid property
>>functions.
>>>Could you clarify when these will be available?
>>>
>>>I tried using a connection like
>>>
>>>db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
>>> "Data Source=C:\Program Files\Microsoft Visual Studio\VB98\BIBLIO32.MDB;"
>>> Set adoPrimaryRS = New Recordset
>>> adoPrimaryRS.Open "select Comments,Description,ISBN,Notes,PubID,Subject,Title,[Year
>>>Published] from Titles", db, adOpenStatic, adLockOptimistic
>>>
>>>then when testing for support
>>>
>>>If adoPrimaryRS.Supports(adIndex) And adoPrimaryRS.Supports(adSeek) Then
>>> adoPrimaryRS.Index = "PubID"
>>>End If
>>>
>>>----> this function will return FALSE as adSeek and adIndex are not supported
>>>
>>>adoPrimaryRS.Seek "PubID = " & vValue
>>>-----> will return error message "3251 Object or Provider not capable
of
>>>performing requested operation"
>>>
>>>I understand that this function SEEK AND INDEX where never supported at
>>all
>>>by ADO
>>>
>>>Any ideas?
>>
>
-
Re: Seek command not yet supported?
I am using OLE DB 4.0! Could you give me the connection i need to use assuming
that Jet.OLEDB 4.0 does not support these commands.
"Bill Vaughn" <billva@microsoft.com> wrote:
>
>Jolt is the codename for the OLE DB Jet providers.
>
>"Fred" <evansfr@ramgroup.com> wrote:
>>
>>Bill
>>I use Microsoft.Jet.OLEDB.4.0 as the provider quering an Ms Access 2000
>db.
>>Could you explain about this JOLT provider?
>>
>>"Bill Vaughn" <billva@microsoft.com> wrote:
>>>
>>>The seek is only supported on Jet 4.0 databases with the Jolt 4.0 provider
>>>supplied with ADO 2.5.
>>>
>>>bv
>>>"Fred" <evansfr@ramgroup.com> wrote:
>>>>
>>>>I have been using the ado v.2.6 and noticed that SEEK and INDEX are not
>>>yet
>>>>supported, however, curiously enough, they are listed as valid property
>>>functions.
>>>>Could you clarify when these will be available?
>>>>
>>>>I tried using a connection like
>>>>
>>>>db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
>>>> "Data Source=C:\Program Files\Microsoft Visual Studio\VB98\BIBLIO32.MDB;"
>>>> Set adoPrimaryRS = New Recordset
>>>> adoPrimaryRS.Open "select Comments,Description,ISBN,Notes,PubID,Subject,Title,[Year
>>>>Published] from Titles", db, adOpenStatic, adLockOptimistic
>>>>
>>>>then when testing for support
>>>>
>>>>If adoPrimaryRS.Supports(adIndex) And adoPrimaryRS.Supports(adSeek) Then
>>>> adoPrimaryRS.Index = "PubID"
>>>>End If
>>>>
>>>>----> this function will return FALSE as adSeek and adIndex are not supported
>>>>
>>>>adoPrimaryRS.Seek "PubID = " & vValue
>>>>-----> will return error message "3251 Object or Provider not capable
>of
>>>>performing requested operation"
>>>>
>>>>I understand that this function SEEK AND INDEX where never supported
at
>>>all
>>>>by ADO
>>>>
>>>>Any ideas?
>>>
>>
>
-
Re: Seek command not yet supported?
Bill
Do you think you could possible advise which components i need to use and
advise what is wrong with the code, because, i have downloaded the MDAC for
win 98, installed, taken all steps as hightlighted in the Microsoft web site,
but am still having problems in getting ADO 2.5 and later versions to support
Indexing and Seek. I am using OLEDB 4.0. Do i assume that OLEDB 4.0 does
not support and need to use a latter version?, possibly OLE DB 5.0? If 4.0
is the latest version, which dll or tlb i need to have installed to make
it work? I have spoken to other people, and everyone have been having similar
problems.
Thank you
"Bill Vaughn" <billva@microsoft.com> wrote:
>
>Jolt is the codename for the OLE DB Jet providers.
>
>"Fred" <evansfr@ramgroup.com> wrote:
>>
>>Bill
>>I use Microsoft.Jet.OLEDB.4.0 as the provider quering an Ms Access 2000
>db.
>>Could you explain about this JOLT provider?
>>
>>"Bill Vaughn" <billva@microsoft.com> wrote:
>>>
>>>The seek is only supported on Jet 4.0 databases with the Jolt 4.0 provider
>>>supplied with ADO 2.5.
>>>
>>>bv
>>>"Fred" <evansfr@ramgroup.com> wrote:
>>>>
>>>>I have been using the ado v.2.6 and noticed that SEEK and INDEX are not
>>>yet
>>>>supported, however, curiously enough, they are listed as valid property
>>>functions.
>>>>Could you clarify when these will be available?
>>>>
>>>>I tried using a connection like
>>>>
>>>>db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
>>>> "Data Source=C:\Program Files\Microsoft Visual Studio\VB98\BIBLIO32.MDB;"
>>>> Set adoPrimaryRS = New Recordset
>>>> adoPrimaryRS.Open "select Comments,Description,ISBN,Notes,PubID,Subject,Title,[Year
>>>>Published] from Titles", db, adOpenStatic, adLockOptimistic
>>>>
>>>>then when testing for support
>>>>
>>>>If adoPrimaryRS.Supports(adIndex) And adoPrimaryRS.Supports(adSeek) Then
>>>> adoPrimaryRS.Index = "PubID"
>>>>End If
>>>>
>>>>----> this function will return FALSE as adSeek and adIndex are not supported
>>>>
>>>>adoPrimaryRS.Seek "PubID = " & vValue
>>>>-----> will return error message "3251 Object or Provider not capable
>of
>>>>performing requested operation"
>>>>
>>>>I understand that this function SEEK AND INDEX where never supported
at
>>>all
>>>>by ADO
>>>>
>>>>Any ideas?
>>>
>>
>
Similar Threads
-
By Phil Weber in forum .NET
Replies: 632
Last Post: 10-01-2003, 12:00 AM
-
By Roberto Guadamuz Hidalgo in forum VB Classic
Replies: 0
Last Post: 05-14-2001, 03:07 PM
-
By Graham Wilson in forum VB Classic
Replies: 0
Last Post: 11-02-2000, 09:54 AM
-
By Peter in forum VB Classic
Replies: 1
Last Post: 07-31-2000, 04:00 PM
-
By Fred in forum VB Classic
Replies: 1
Last Post: 06-03-2000, 11:12 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks