SEEK and INDEX whith ADO ???
Thank, i have learn something of new.
But now i have write this code and it not function again
Why ?
'string connection before
'sdbCnn = "DSN=MS Access 97
Database;DBQ=c:\Temp\UniMag.mdb;DefaultDir=c:\Temp;DriverId=281;FIL=MS
Access;FILEDSN=C:\Programmi\File comuni\ODBC\Data Sources\MS Access 97
Database (not sharable).dsn;MaxBufferSize=2048;PageTimeout=5;UID=admin;"
'string connection current
sdbCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Temp\UniMag.mdb;Persist Security Info=False"
Set DBCnn = New ADODB.Connection
DBCnn.Open sdbCnn
vMatr(0) = "2020520122"
Set rec = New ADODB.Recordset
rec.CursorLocation = adUseServer
rec.Open "Prodotti", DBCnn, , , adCmdTable
Dim b As Boolean
b = b
b = rec.Supports(adIndex) ' result FALSE (will be must TRUE)
rec.Index = "PrimaryKey"
rec.Seek vMatr(), adSeekFirstEQ
rec.Find "CodProdotto = '" & "43340480178" & "'"
Thank and ciao
Quote:
> Hi,
> That means that when you connect to database you are using some provider,
> like OLEDB Jet, SQL OLEDB and not all of those providers support
> functionality related to Seek and Index. As fas as I know only OLEDB JET
4.0
> supports that functionality, which means that you could use Index and Seek
> with Access database.
> --
> Val Mazur
> Microsoft MVP
> > Hi,
> > sorry for my language,
> > but i'm italian.
> > I want use a Key("PrimaryKey") in a Access DB,
> > with the Method Seek of ADO: can i realize it, like in DAO ??
> > l'Help tell me that i can realize it "if the provider can support the
> > property Index and the
> > method Seek" : what it mean ??
> > Thank to all
> > Hi,ciao