Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21278

[RESOLVED] Need Help (VB6 + Access Multiple user update)

$
0
0
How to allow multiple users to get into the same Access database?

multiple users having a problem on updating records at the same time.
only 1 user can successfully update record.


What am i doing wrong?

Sample Code
----Module 1----

Public CN As New ADODB.Connection
Public RS As New ADODB.Recordset

Public Sub CONNECT()

On Error GoTo Err_Handler:

Set CN = New ADODB.Connection

CN.Open "Provider=MSDASQL.1;Persist Security Info=False;Data Source=dbSample"

Exit Sub

Err_Handler:

MsgBox Err.Description, vbCritical + vbOKOnly, "Database Connection Error"

Exit Sub

End Sub

----Command Button Code----

Dim Sql as String

Sql = "Select * From tbl_Sample"

set rs=new adodb.recordset

rs.open sql,cn,3,3

rs.addnew

rs.update

set rs=nothing

Viewing all articles
Browse latest Browse all 21278

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>