|
-
Mar 21st, 2002, 11:26 AM
#1
Thread Starter
Member
Paradox
Hi,
I am trying to open a paradox 8 table to add and update records.
When I get to the "set rs" line I get RT error 3078. It says it can't find the table.
I have never used VB with Paradox. Can anyone tell me where I am going wrong?
Private Sub CommandStart_Click()
Dim ws As Workspace
Dim db As Database
Dim strConnection As String
Dim rs As Recordset
Set ws = DBEngine.Workspaces(0)
Let strConnection = "ODBC;DSN=Paradox8" & DatabaseName & ";UID=" & UserName & ";PWD=" & UserPassword
Set db = ws.OpenDatabase("", False, False, strConnection)
Set rs = db.OpenRecordset(App.Path & "\PartsInventory.db")
'Test
rs.MoveFirst
Do While Not rs.EOF
Text1.Text = rs("Partnumber")
rs.MoveNext
Loop
End Sub
You tried your best and failed miserably. The lesson is, never try. Homer J. Simpson
-
Mar 21st, 2002, 11:31 AM
#2
strConnection = "ODBC;DSN=Paradox8" & DatabaseName & ";UID
doesn't appear to have any kind of separator between Paradox8
and DatabaseName It'd be the same as :
strConnection = "ODBC;DSN=Paradox8C:\Mydatabasename"
& ";UID
This might be part of your problem. On the other hand, since I
can't see the code that sets DatabaseName, possibly you've
handled it there.
In which case:
Set rs = db.OpenRecordset(App.Path & "\PartsInventory.db")
I haven't used Paradox in a coon's age, but I don't think the
tables are post-fixed with ".db" Looks like to me, you got the db
mixed up with the table.
HTH
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
|
Click Here to Expand Forum to Full Width
|