Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paul_w_routledg
Contributor II

Sybase Connection String

Can anyone advise on the best approach for specifying a Sybase connection string.

When using Oracle OLEDB drivers I use a connectoin string like

SET ConnectString='[Provider=OraOLEDB.Oracle;Data Source=(TNS_NAMES_ENTRY)] (XUserId is X, XPassword is Y)';

OLEDB CONNECT TO $(ConnectString);

Where TNS_NAMES_ENTRY is the filkl specification for Oracle as it might appear in a tnsnames.ora file.

This does not require any other settings on the server, no tnsnames.ora file no entries in the Windows ODBC administrator.

I want to do something similar for Sybase Adaptive Server 15.7 using ODBC. Again I would prefer to not have a sybase sql.ini file that needs maintaining and do not want to set up a DSN in Windows ODBC Administrator.

1 Solution

Accepted Solutions
paul_w_routledg
Contributor II

Re: Sybase Connection String

I found a variety of options at this site

Sybase ASE OLE DB Provider Connection Strings - ConnectionStrings.com

This is the option that worked for me:

Provider=Sybase.ASEOLEDBProvider;Srvr=myASEserver,5000;Catalog=myDataBase;User Id=myUsername;Password=myPassword;

But it did involve choosing OLEDB rather than ODBC.

2 Replies
Not applicable

Re: Sybase Connection String

We use the Sybase OLEDB provider to connect

OLEDB CONNECT32 TO [Provider=Sybase.ASEOLEDBProvider.2;Initial Catalog=tempdb;User ID=<userid>;Data Source=<servername>;Extended Properties=""] (XPassword is VXYIDbJOJTaIWQdMRJOYN);

With ODBC you are required to set up a datasource. With Sybase OLEDB you still need a .ids config file with the serverdetails (made with the Sybase ASE OLEDB Configuration Manager). 

paul_w_routledg
Contributor II

Re: Sybase Connection String

I found a variety of options at this site

Sybase ASE OLE DB Provider Connection Strings - ConnectionStrings.com

This is the option that worked for me:

Provider=Sybase.ASEOLEDBProvider;Srvr=myASEserver,5000;Catalog=myDataBase;User Id=myUsername;Password=myPassword;

But it did involve choosing OLEDB rather than ODBC.

Community Browser