手上只有PB代码你也参考一下把// Profile test SQLCA.DBMS = "MSS Microsoft SQL Server 6.x" SQLCA.Database = "SQLTest" SQLCA.ServerName = "本机名" SQLCA.AutoCommit = False SQLCA.DBParm = "OptSelectBlob=1,DateTimeAllowed='Yes',Secure=1"
//vb用odbc的写法 DIM fk_server As New ADODB.Connection Dim record As New ADODB.Recordsetfk_server.ConnectionString="DSN=" & DSN_name & ";UID=" & UID_name & ";PWD=" & PWD_name & ";Database=" & database_name_FK & ";" If fk_server.State = 0 Then fk_server.Open End If Set record.ActiveConnection = fk_server record.CursorLocation = adUseClient record.CursorType = adOpenStatic record.LockType = adLockOptimistic record.Source = sql record.Open ...
我也想知道.顶. 你参考下,能运行了告诉我下. Dim mystring As String * 255 Dim driver As String * 64 Dim retcode As Integer driver = "SQL Server " & Chr$(0) mystring = "dsn=erp " & Chr$(0) _ & "DESCRIPTION=描述 " & Chr$(0) _ & "Server=(local) " & Chr$(0) _ & "Useprocforprepare=yes " & Chr$(0) _ & "OEMTOANSI=no " & Chr$(0) _ & "DATABASE=ERP1 " & Chr$(0) _ & "network=DBMSSOCN " & Chr$(0) & Chr$(0)
我也想知道.顶. 你参考下,能运行了告诉我下. Dim mystring As String * 255 Dim driver As String * 64 Dim retcode As Integer driver = "SQL Server " & Chr$(0) mystring = "dsn=erp " & Chr$(0) _ & "DESCRIPTION=描述 " & Chr$(0) _ & "Server=(local) " & Chr$(0) _ & "Useprocforprepare=yes " & Chr$(0) _ & "OEMTOANSI=no " & Chr$(0) _ & "DATABASE=ERP1 " & Chr$(0) _ & "network=DBMSSOCN " & Chr$(0) & Chr$(0)
ADODC1.CommandType = adCmdText
ADODC1.RecordSource = "select * from 表名"
ADODC1.Recordset.Open "增、删、改的SQL语句", "连接字符串"
SQLCA.DBMS = "MSS Microsoft SQL Server 6.x"
SQLCA.Database = "SQLTest"
SQLCA.ServerName = "本机名"
SQLCA.AutoCommit = False
SQLCA.DBParm = "OptSelectBlob=1,DateTimeAllowed='Yes',Secure=1"
DIM fk_server As New ADODB.Connection
Dim record As New ADODB.Recordsetfk_server.ConnectionString="DSN=" & DSN_name & ";UID=" & UID_name & ";PWD=" & PWD_name & ";Database=" & database_name_FK & ";"
If fk_server.State = 0 Then
fk_server.Open
End If
Set record.ActiveConnection = fk_server
record.CursorLocation = adUseClient
record.CursorType = adOpenStatic
record.LockType = adLockOptimistic
record.Source = sql
record.Open
...
你参考下,能运行了告诉我下.
Dim mystring As String * 255
Dim driver As String * 64
Dim retcode As Integer
driver = "SQL Server " & Chr$(0)
mystring = "dsn=erp " & Chr$(0) _
& "DESCRIPTION=描述 " & Chr$(0) _
& "Server=(local) " & Chr$(0) _
& "Useprocforprepare=yes " & Chr$(0) _
& "OEMTOANSI=no " & Chr$(0) _
& "DATABASE=ERP1 " & Chr$(0) _
& "network=DBMSSOCN " & Chr$(0) & Chr$(0)
你参考下,能运行了告诉我下.
Dim mystring As String * 255
Dim driver As String * 64
Dim retcode As Integer
driver = "SQL Server " & Chr$(0)
mystring = "dsn=erp " & Chr$(0) _
& "DESCRIPTION=描述 " & Chr$(0) _
& "Server=(local) " & Chr$(0) _
& "Useprocforprepare=yes " & Chr$(0) _
& "OEMTOANSI=no " & Chr$(0) _
& "DATABASE=ERP1 " & Chr$(0) _
& "network=DBMSSOCN " & Chr$(0) & Chr$(0)