W2K hangs trying to update VB with access db. 
Author Message
 W2K hangs trying to update VB with access db.

Hi all,
Whats wrong with this code ? Select operations is ok but if I try to update
the database the computer hangs when dbConn1.Close is executed.
The database is access 97.

Thanks!
/Johan

Option Explicit
Private Sub cmdCrash_Click()
    Dim dbConn1 As ADODB.Connection
    Dim sAccessConnect As String
    Dim sAppPath As String
    Dim sDBName As String
    Dim sSQL As String

    Set dbConn1 = New ADODB.Connection
    sAppPath = App.Path
    sDBName = "db1.mdb"
    sAccessConnect = "Driver={Microsoft Access Driver (*.mdb)};" & _
                      "Dbq=" & sDBName & ";" & _
                      "DefaultDir=" & sAppPath & ";" & _
                      "Uid=Admin;Pwd=;"
    dbConn1.ConnectionString = sAccessConnect
    dbConn1.CursorLocation = adUseServer
    dbConn1.Mode = adModeReadWrite
    dbConn1.Open
    sSQL = "update user set us_fornamn='kk'"
    dbConn1.Execute sSQL
    dbConn1.Close
End Sub



Sat, 23 Oct 2004 21:39:25 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VB tries to Open MS Access DB [ERROR]

2. VB tries to Open MS Access DB [ERROR]

3. On a LAN 3 PC with VB program try to work with an Access DB

4. VB Program hangs when I try to unprotect word document with password

5. VB Program hangs when I try to unprotect word document with password

6. VB.NET with Access DB on WebForm not Updating

7. SQL update query on an access db in VB

8. DB update problem using VB and Access

9. ADO Update (using VB) of Memo fields in Access 97 DB

10. Converting Access 2.0 DB to Access 97 DB in VB code

11. Installation of Beta 2 on W2K hangs

12. W2k Task-Scheduler -> find hanging tasks

 

 
Powered by phpBB® Forum Software