Cound not find installable ISAM Error

A

Anatoly Kurilin

Hi, each time I use that code for calculating a number of user connected to
a data file, I get an error message:
Could not find installable ISAM. What do I do wrong?

Dim cn As New ADODB.Connection
Dim cn2 As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim intUserCount As Integer
Dim strPassword As String

strPassword = ";PWD=" & gcDatabasePwd
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "Data Source=" & strBackEndFileSpecs & strPassword

cn2.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
strBackEndFileSpecs & strPassword

Set rs = cn.OpenSchema(adSchemaProviderSpecific, ,
"{947bb102-5d43-11d1-bdbf-00c04fb92675}")


While Not rs.EOF
intUserCount = intUserCount + 1
rs.MoveNext
Wend

gUserCount = intUserCount
End Function
 
B

Brendan Reynolds

You're missing the 'Provider=' in front of 'Microsoft.Jet.OLEDB.4.0'.

If you are trying to pass a database password rather than a user name and
associated password, then you do not use 'PWD', you use 'Jet OLEDB:Database
Password'.

Here's an example ...

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\usenet\dbpass.mdb;Persist
Security Info=False;Jet OLEDB:Database Password=PasswordGoesHere
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top