attention is a test code!
my code:
Sub TEST()
Dim Rs As DAO.Recordset, db2 As DAO.Database, sConnect As String, SQL As String, queryDef As queryDef
'Set ws = CreateWorkspace("ODBCWorkspace", "", "", dbUseODBC)
sConnect = "Driver={ODBC Driver 17 for SQL Server};Server=99.99.99.99;Database=keystore2;UID=sa;PWD=abcdef;OPTION=3;"
Set db2 = OpenDatabase("", False, False, sConnect)
' Rs.Close
'Set Rs = db2.OpenRecordset("SELECT * FROM CLIENTI", dbOpenDynaset)
'SQL = "UPDATE CLIENTI SET RAG_SOC='PIPPO' WHERE CODICE='100'"
Set Rs = db2.OpenRecordset( _
"UPDATE CLENTI SET RAG_SOC='PIPPO' WHERE CODICE='100'", dbOpenDynaset, _
dbSeeChanges) <<<<<<
'Set Rs = db2.OpenRecordset(SQL, dbOpenDynaset, dbSeeChanges)
'Rs.MoveFirst
'Rs.MoveLast
'Rs.FindFirst "CODICE ='100'"
'Rs.Edit
'Rs("RAG_SOC") = "PIPPO"
'Rs.Update '->>>>>>>> ERRORE !
End Sub
have error in <<<<<<
I need to update the table CLIENTI > fieLd RAG_SOC='PIPPO' where CODICE='100'
my code:
Sub TEST()
Dim Rs As DAO.Recordset, db2 As DAO.Database, sConnect As String, SQL As String, queryDef As queryDef
'Set ws = CreateWorkspace("ODBCWorkspace", "", "", dbUseODBC)
sConnect = "Driver={ODBC Driver 17 for SQL Server};Server=99.99.99.99;Database=keystore2;UID=sa;PWD=abcdef;OPTION=3;"
Set db2 = OpenDatabase("", False, False, sConnect)
' Rs.Close
'Set Rs = db2.OpenRecordset("SELECT * FROM CLIENTI", dbOpenDynaset)
'SQL = "UPDATE CLIENTI SET RAG_SOC='PIPPO' WHERE CODICE='100'"
Set Rs = db2.OpenRecordset( _
"UPDATE CLENTI SET RAG_SOC='PIPPO' WHERE CODICE='100'", dbOpenDynaset, _
dbSeeChanges) <<<<<<
'Set Rs = db2.OpenRecordset(SQL, dbOpenDynaset, dbSeeChanges)
'Rs.MoveFirst
'Rs.MoveLast
'Rs.FindFirst "CODICE ='100'"
'Rs.Edit
'Rs("RAG_SOC") = "PIPPO"
'Rs.Update '->>>>>>>> ERRORE !
End Sub
have error in <<<<<<
I need to update the table CLIENTI > fieLd RAG_SOC='PIPPO' where CODICE='100'