cancel
Showing results for 
Search instead for 
Did you mean: 

Remote ODBC connection to SAP SQL Anywhere 17

anatoliysova
Explorer
0 Kudos

Hi everyone.

It is my first post here and my question is: could anyone give me an example of working connection string to connect to SQL Anywhere 17 DB using ODBC without DSN?

I have already tried several connection strings found in Internet but no luck with that.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186998
Contributor
0 Kudos

Hi Anatoliy,

Can the following information help you?

Database connection information for ODBC applications

http://dcx.sap.com/index.html#sqla170/en/html/815a501b6ce21014b8589cda13357357.html

Thanks,

Atsushi

anatoliysova
Explorer
0 Kudos

Arigato for reply,

Actually I need to create actual connection string for ODBC connection.

Befiore I was using OLE DB and this connection string worked just fine:

String.Format("Provider={0};Server={1};Initial Catalog={2};User Id={3};Password={4}", driver, server, database, user, password)

but now I am porting my program to Unix so OLE DB is not an option.

former_member186998
Contributor
0 Kudos

Hi Anatoliy,

Connecting to a SQL Anywhere Database Using ODBC in a Linux or Unix Environment

https://wiki.scn.sap.com/wiki/display/SQLANY/Connecting+to+a+SQL+Anywhere+Database+Using+ODBC+in+a+L...

Thanks,

Atsushi

anatoliysova
Explorer
0 Kudos

Thanks again, I have used connection string parameters listed in your link, but that's what I get (attached image).

Still could not manage to create working connection string for ODBC connection without DSN.

former_member182948
Active Participant
0 Kudos

Hello Anatoliy,

I think that the Driver parameter is incorrect.

The Driver parameter is generally described as follows in the Unix environment

Driver=/opt/sqlanywhere16/lib64/libdbodbc16.so

For details, please see the following document.

"Connecting to a SQL Anywhere Database Using ODBC in a Linux or Unix Environment"

Driver Managers and SQL Anywhere

   Using unixODBC and SQL Anywhere

Regards,

Koichi

anatoliysova
Explorer
0 Kudos

Thanks for answer

Here is working connection string:

Driver={SQL Anywhere 17};LINKS=TCPIP{HOST=localhost};ENG=demo17;DBN=demo;uid=DBA;pwd=sql

Answers (0)