Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003

    Unanswered: Read-Only a Paradox DB using Access 2K

    I have a paradox DB that is constantly being written to by a C program. I have an Access 2000 Db that stops the C program from executing (which in turn removes any locks on the paradox DB) and then allows me to edit the paradox DB from Access. This works fine.
    I also have another access DB that needs to view the paradox DB table even when the C program is writing to the DB. In other words, I need to be able to 'read-only' the PDB. How can I achieve this using VB code. I found this code which I can't get working for the life of me, but I think it may be a step in the right direction. Can anyone help a very stressed man out?

    Sub DataTest()

    Const CONNECT_STRING = "Driver={Microsoft Paradox Drive (BLOCKS.db )};" & "Data Source=C:\SSCS\HOST\BLOCKS.db"

    Dim RecordSet As New ADODB.RecordSet
    Dim Connection As New ADODB.Connection

    Call Connection.Open(CONNECT_STRING)

    Call RecordSet.Open("BLOCKS", Connection, adOpenDynamic, adLockOptimistic)
    End Sub

  2. #2
    Join Date
    Aug 2003
    Bologna - Italy
    Sorry, but one of the more big defects of the MsPdox odbc driver is the fact that it doesn't respect Pdox BDE locks, so, if i remeber it good enough, you cannot use it to access Pdox table while they're being used by BDE.

    If you're corageous enough, you could use direct calls to the BDE API to connect to the table, but that would be much more difficult than standard db access under normal VB code.
    The only failure is not trying to do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts