Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I connect SQLbase 8 - Visual Basic 6 with OLEDB?

Status
Not open for further replies.

backdraf

Programmer
Aug 27, 2002
1
PE
Please I need to know the steps to make this connection.
I´m working with SQLBase 8 and VIsual Basic 6.

Thanks

Alfredo
 
make sure you got SQLBASEOLEDB 1.0 in your reference, then type this code :
Dim objSQLBaseServer As SQLBASEOLEDBServer
Set objSQLBaseServer = New SQLBASEOLEDBServer
Dim strServer As String
Dim strPwd As String

strServer = "SERVER1"
strPwd = ""
objSQLBaseServer.ConnectServer strServer, strPwd

objSQLBaseServer.DisconnectServer

MsgBox "CONNECTED ON " & strServer & " w/ SQLBASEOLEDBServer"
 
Can anyone tell me if there are any more details to this ?
Im running SQLBase 7.5.1 and VB6 with the connection details specified above, but it doesnt connect. I have the SQLOLEDB 1.0 Reference set in VB and Im using my own server and password which work fine in the Windows ODBC Administrator test applet. The error I am getting is "Run-time error -2147467259(8000040005) Method 'ConnectServer' of object 'ISQLBASEOLEDBServer' failed." What else can I check?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top