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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connection to sybase database

Status
Not open for further replies.

gd082

Programmer
Mar 12, 2002
42
0
0
BE
I want to connect to a sybase database on a server.
I don't have a odbc driver for this. Where can i get one?
I would like to use a dsn-less connection but don't know the string to fill in into the connectionstring-property either.
Can someone help me please?

thanks
 
Found the following subs in my ConnectionEngine.DLL that I created some time ago.

However, I have never used any of the sybase connections.

Hope this might be of use to you

Sub ODBC_SyBase_System_12(strDataSource As String, strLogin As String, strPassword As String)

'If using the Sybase System 12 (or 12.5) Enterprise Open Client ODBC Driver:
cn.Open "Driver={SYBASE ASE ODBC Driver};" & _
"Srvr=" & strDataSource & ";" & _
"Uid=" & strLogin & ";" & _
"Pwd=" & strPassword & ";"

End Sub

Sub ODBC_SyBase_System_11()

'If using the Sybase System 11 ODBC Driver:
cn.Open "Driver={SYBASE SYSTEM 11};" & _
"Srvr=" & strDataSource & ";" & _
"Uid=" & strLogin & ";" & _
"Pwd=" & strPassword & ";"

End Sub

Sub ODBC_SyBase_Intersolv_3_10(strDataSource As String, strLogin As String, strPassword As String)

'If using the Intersolv 3.10 Sybase ODBC Driver:
cn.Open "Driver={INTERSOLV 3.10 32-BIT Sybase};" & _
"Srvr=" & strDataSource & ";" & _
"Uid=" & strLogin & ";" & _
"Pwd=" & strPassword & ";"

End Sub

Sub ODBC_SyBase_SQL_Anywhere(strFilePath As String, strLogin As String, strPassword As String)

cn.Open "ODBC; Driver=Sybase SQL Anywhere 5.0;" & _
"DefaultDir=" & strFilePath & "\;" & _
"Dbf=" & strFilePath & ".db;" & _
"Uid=" & strLogin & ";" & _
"Pwd=" & strPassword & ";" & _
"Dsn="""";"
'Note: Including the DSN tag with a null string is absolutely critical or
'else you get the dreaded -7778 error.

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top