[RESOLVED] Connection using oledb and ADODB coding: Error...
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
Re: Connection using oledb and ADODB coding: Error...
Here's an example of connectionstring for SQL Server....
VB Code:
'Standard security:
Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;
'Trusted Connection:
Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;
On what line does the error occurs? Is it in the Ex.Openrecordset line?
Re: Connection using oledb and ADODB coding: Error...
hey dee-u
my sqlserver connection works....but the second connection string i provided didnt...that was for sqlbase....
the error occured on
do u have any ideas???
Re: Connection using oledb and ADODB coding: Error...
Try visiting this link.
I know nothing about SQLBase so I couldnt provide you a good advice.... Sorry.....