Pessimistic Recordlocks Access --> SQL Server 6.5 
Author Message
 Pessimistic Recordlocks Access --> SQL Server 6.5

Hi,

I was trying to create a testform that is able to pessimistic lock a
record through MS-Access on a SQL Server 6.5 Table.

It work fine. BUT, as always there is a BUT:

When using the OpenConnection-Command in MS-Access it always askes me to

perform the login on the SQL Server, even if the
dbDriverCompleteRequired option is turned on.  I want i to connect
automatically through the ConnectionString. (witch probably is wrong)

I have a file dns called "data.dns"
The SQL Server database is called "DataSQL"
        Login: sa
        Passw: <<none>>
And the table where i want to lock the record in is named "MASTERTable"

In the testform i hav 2 buttons:
One prepares access to edit the record and starts editing it.
The other one updates the record and closes everything.

This is the code for the buttons:

Private Sub LockODBCRecord_Click()
    Set wrkODBC = CreateWorkspace("ODBCWorkSpace", "admin", "",
dbUseODBC)
    Set conODBC = wrkODBC.OpenConnection("ODBCConnection",
dbDriverCompleteRequired, ,
"ODBC;DATABASE=DataSQL;UID=sa;PWD=;DSN=Data;")
    Set RecSet = conODBC.OpenRecordset("MASTERTable", dbOpenDynaset, 0,
dbPessimistic)
    RecSet.Move 5
    RecSet.Edit
    Me![Locked] = True
End Sub

Private Sub UnLockODBCRecord_Click()
    RecSet.Update
    RecSet.CLOSE
    conODBC.CLOSE
    wrkODBC.CLOSE
    Me![Locked] = False
End Sub

Please Help me out, by replying to these newsgroups.
(I do NOT have an email address...)

Greatings,
Boelen Werner
CAT Logistics
Belgium



Tue, 10 Oct 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Access 97 and SQL Server 6.5

2. Syntax for VB6.0 to access SQL Server 6.5

3. migration vb3.0: from access 2.0 to sql server 6.5

4. I need, must have program for converting Access DB to SQL server 6.5 Script

5. Syntax for VB6.0 to access SQL Server 6.5

6. Access to SQL Server 6.5

7. VBScript Error due to converting databases from Access to SQL Server 6.5

8. Moving from access to sql server 6.5

9. Need help Access 97 vs SQL Server 6.5?

10. SQL Server 6.5 Database Access

11. Access 97 vs SQL Server 6.5

12. sql server connect. Migration Access->sql server

 

 
Powered by phpBB® Forum Software