Results 1 to 2 of 2

Thread: Paradox

  1. #1

    Thread Starter
    Member danperlman's Avatar
    Join Date
    Aug 2001
    Location
    Sandy, Utah
    Posts
    39

    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

  2. #2
    DerFarm
    Guest
    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
  •  



Click Here to Expand Forum to Full Width