Michael Bechard
December 1st, 1999, 10:32 AM
I'm trying to query a Paradox 4.x table in VB. It works fine, but it doesn't know how to lock the table on the network while the recordset is open. If I try to view the table on another machine while it's open, it says it can't find the table. Here's the code:
set ODBC = CreateWorkspace("", "MBECHARD", "", dbUseODBC)
set DB = ODBC.OpenDatabase("Paradox", dbDriverComplete, true, "ODBC;UID=Michaelb")
set RS = DB.OpenRecordset("SELECT * FROM MBTEST", dbOpenSnapshot, dbExecDirect)
set RSField = RS.Fields(1)
txtWorkOrder.Text = RSField.Value
And using an IISAM...
set JET = CreateWorkspace("NewJetWorkspace", "Admin", "", dbUseJet)
set DB = JET.OpenDatabase("", false, true, "Paradox 4.x;DATABASE=S:\DATA2;UID=Michaelb")
set RS = DB.OpenRecordset("SELECT * FROM MBTEST", dbOpenSnapshot, dbDenyRead)
set RSField = RS.Fields(1)
txtWorkOrder.Text = RSField.Value
Another thing; when I try to see a list of all users connected to Paradox, the user-name I'm connecting with doesn't show up either. I don't think it's writing the necessary information in the lck files. Any ideas?
set ODBC = CreateWorkspace("", "MBECHARD", "", dbUseODBC)
set DB = ODBC.OpenDatabase("Paradox", dbDriverComplete, true, "ODBC;UID=Michaelb")
set RS = DB.OpenRecordset("SELECT * FROM MBTEST", dbOpenSnapshot, dbExecDirect)
set RSField = RS.Fields(1)
txtWorkOrder.Text = RSField.Value
And using an IISAM...
set JET = CreateWorkspace("NewJetWorkspace", "Admin", "", dbUseJet)
set DB = JET.OpenDatabase("", false, true, "Paradox 4.x;DATABASE=S:\DATA2;UID=Michaelb")
set RS = DB.OpenRecordset("SELECT * FROM MBTEST", dbOpenSnapshot, dbDenyRead)
set RSField = RS.Fields(1)
txtWorkOrder.Text = RSField.Value
Another thing; when I try to see a list of all users connected to Paradox, the user-name I'm connecting with doesn't show up either. I don't think it's writing the necessary information in the lck files. Any ideas?