0

Hi experts out there,

I have a program where the backend is access database. I was able to run the program in user's pc after i placed it at C drive. After that, i placed it in the server and created shortcut to the.exe, the program ran. But, when i clicked the save button to store the data, it showed this error:
Runtime error '-2147467259 (80004005)'
Operation must use an updateable query.
Please anyone help me with this problem. I need it urgently. Thank you in advance.

3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by AndreRet
0

Your problem is that you created a shortcut to the .exe and not the database which was not at the path specified. If you are changing to a server, you will need a different connection string and make sure the database resides in the path specified.

Your app can not read from your database because it does not reside in the path specified.

0

Hi,
This is my connection string:

Sub ConnectDB()
    Dim strDB As String
    Dim varYN As Variant
    varYN = MsgBox("Use Test Environment", vbYesNo)
    If varYN = vbNo Then
    strDB = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.path & "\LSICBLKIT.mdb;Persist Security Info=False"
    Else
    strDB = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.path & "\TEST_LSICBLKIT.mdb;Persist Security Info=False"
    End If
    
    Set DB = New ADODB.Connection
    DB.CursorLocation = adUseClient
    DB.Open strDB
End Sub

How do i change the connection string to point to the database in server? Pls help.

0

You will need to make use of the IP Address. Try the following -

strDB = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\192.168.0.199\MySerberCDriveName\LSICBLKIT.MDB;Persist Security Info=False"
 '192.168.0.199 = your Ip Address on which the database will be running.

Did this help?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.