Adodb connection error with multiple users

KUYJS

New Member
Joined
Sep 3, 2018
Messages
43
I designed a tool using vba with few buttons (Get claim, Save, Hold and Clear). Work allocation is at separate file within same shared drive from which claim will come to handlers one by one. (Process first then ll be able to get next one)

Managing 100 people on this seems difficult, when multiple people click on Save or Hold button at same time. Because data should get save at its original position (row/column in which it was allocated)

i am able to do this with single user but if more than one user clicks at same time then it create issue. Either it shows debug error or allocation file gets open. How to handle multiple people at same time.

My code is something like this:

Sub test()
Const sCONN As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\temp\Allocation.xlsx;Extended Properties=""Excel 12.0 Xml;HDR=YES"";"
Dim sSQL As String
Dim objRS As Object 'Make the SQL sSQL = Join$(Array("UPDATE [Hire$]", _ "SET TaskStatus = 'Complete'", _ "WHERE TaskName = 'alpha' AND EmpID = 2"), vbCr)
Set objRS = CreateObject("ADODB.Recordset")
objRS.Open sSQL, sCONN
Set objRS = Nothing
End Sub
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,909
Messages
6,175,310
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top