Home > Software engineering >  Please the great god can help me have a look at how the VB data updates to access
Please the great god can help me have a look at how the VB data updates to access

Time:09-24

Conn. Execute (" Update table 1 set C='Text1. Text', K='Text2. Text', G='Text3. Text' ")
Said the execute method error connection failure

CodePudding user response:

You this error is not connected well, complete code up to look at it

CodePudding user response:

Conn connection? The Execute conn not connected, of course not implementation,

CodePudding user response:

Conn first NEW
Set up the ConnectionString attribute
Then Open the
Now you can perform
Use up Close
The Set again Nothing

CodePudding user response:

Conn. Execute (" Update table 1 set C='" & amp; Text1. Text & amp; "', K=" & amp; Text2. Text & amp; "', G='" & amp; Text3. Text & amp; "'")

Stick open the conn's statement, is roughly like this:

 Dim conn As ADODB. Connection 

Set the conn=New ADODB. Connection
Conn. Open the Provider="Microsoft. Jet. The OLEDB. 4.0; The Data Source=\ somepath \ mydb MDB "

CodePudding user response:

Conn. Execute "Update table 1 set C='" & amp; Text1. Text & amp;" ', K="& amp; Text2. Text & amp;" ', G='" & amp; Text3. Text & amp;" "'"
  • Related