Hello. I just inherited a program written in Visual Basic 6 which connects to a MS Access data base. I have Access version 2003 installed on my PC. I'm not sure what version the DB was originally created in (don't know how to find out).
In production, the DB is on a shared drive and the VB program is on the PC -- it works fine like that on my PC.
I am trying to set up a development environment, using a local version of the DB and running the program from the VB IDE.
Without a single code change, on my local PC I get the following error: "Error 3170: Counldn't find installable ISAM."
I found a few references to this on the web that talk about doing something in the registry, but they're pretty vague on what I'm actually supposed to do. And also, if it were a registry issue, wouldn't I have the same problem accessing the DB on the shared drive?
Does anyone have any ideas?
Here's the code:
Thanks,
Tom
In production, the DB is on a shared drive and the VB program is on the PC -- it works fine like that on my PC.
I am trying to set up a development environment, using a local version of the DB and running the program from the VB IDE.
Without a single code change, on my local PC I get the following error: "Error 3170: Counldn't find installable ISAM."
I found a few references to this on the web that talk about doing something in the registry, but they're pretty vague on what I'm actually supposed to do. And also, if it were a registry issue, wouldn't I have the same problem accessing the DB on the shared drive?
Does anyone have any ideas?
Here's the code:
Code:
Private Sub Form_Initialize()
On Error GoTo errHandle
Dim tempStr As String
FirstTimeUser = False
dataContacts.DatabaseName = DBPath
dataContacts.RecordSource = "select * from contacts"
dataContacts.Refresh
'Get the user ID from a text file. If the file doesn't exist then create it.
Open App.Path & "\UserID.txt" For Input As #1
Input #1, tempStr
Close #1
txtUserID = tempStr
Exit Sub
errHandle:
If Err.Number = 53 Then
FirstTimeUser = True
Else
MsgBox "Error " & Err.Number & ": " & Err.Description
Stop
End If
End Sub
Thanks,
Tom