这几句计算机语言是什么意思Dim cnn As ADODB.ConnectionDim rs As ADODB.RecordsetDim connect_string As StringDim statestring As StringSet cnn = New ADODB.ConnectionSet rs = New ADODB.Recordsetconnect_string = "Provider=sqloledb.1;Server=127
这几句计算机语言是什么意思Dim cnn As ADODB.ConnectionDim rs As ADODB.RecordsetDim connect_string As StringDim statestring As StringSet cnn = New ADODB.ConnectionSet rs = New ADODB.Recordsetconnect_string = "Provider=sqloledb.1;Server=127
这几句计算机语言是什么意思
Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim connect_string As String
Dim statestring As String
Set cnn = New ADODB.Connection
Set rs = New ADODB.Recordset
connect_string = "Provider=sqloledb.1;Server=127.0.0.1;UID=sa;PWD=;database=pro"
cnn.Open connect_string
这几句计算机语言是什么意思Dim cnn As ADODB.ConnectionDim rs As ADODB.RecordsetDim connect_string As StringDim statestring As StringSet cnn = New ADODB.ConnectionSet rs = New ADODB.Recordsetconnect_string = "Provider=sqloledb.1;Server=127
Dim cnn As ADODB.Connection '声明变量cnn为ADODB数据连接;
Dim rs As ADODB.Recordset ’声明变量rs为ADODB数据集;
Dim connect_string As String ’声明connect_string为数据库连接变量(数据库连接字符串);
Dim statestring As String ’声明statestring为数据库状态字符串;
Set cnn = New ADODB.Connection '新建一个数据库连接;
Set rs = New ADODB.Recordset '新建一个数据库数据集;
connect_string = "Provider=sqloledb.1;Server=127.0.0.1;UID=sa;PWD=;database=pro"
’数据库连接字符串(数据库为:SQL数据库;服务器为本机(127.0.0.1);UID(数据库连接的角色名):sa,密码为空;数据库名:pro;)
cnn.Open connect_string ‘根据上面的字符串变量的值进行数据库连接;