Hey
using the connection below i can connect to a database located on our SQL Server.
when i change this connection to connect to a database on a SQLBase server it generates a runtime error. which states "multi-step oledb operating generated error. check each oledb status value. No work was done"
the code for the sqlbase server is located below the sql server connection
VB Code:
'SQL SERVER CONNECTION Private Sub Form_Load() Set cn = New ADODB.Connection Set rs = New ADODB.Recordset 'Create References and Set ex = New Class1 'open database file cn.ConnectionString = "Provider=sqloledb;" & _ "data source=vms2;" & _ "Initial Catalog=ss638;" & _ "uid=***;" & _ "pwd=***" cn.Open ex.OpenRecordset rs, "PART", cn Set ex.ADORecordset = rs FileName End Sub
VB Code:
'SQLBASE CONNECTION Private Sub Form_Load() Set cn = New ADODB.Connection Set rs = New ADODB.Recordset 'Create References and Set ex = New Class1 'open database file cn.ConnectionString = "Provider=sqlbaseoledb;" & _ "data source=servergs;" & _ "Initial Catalog=vmfg638;" & _ "uid=***;" & _ "pwd=***" cn.Open ex.OpenRecordset rs, "PART", cn Set ex.ADORecordset = rs FileName End Sub
can someone please tell me wat i am doing wrong...
cheers




Dont forget to Rate a post that Helped you 

Reply With Quote