“ERROR 01S00 INTERSOLVODBC SQL Server driverInvalid attribute in connection string: User.” when connecting to a Sybase database

"ERROR [01S00] [INTERSOLV][ODBC SQL Server driver]Invalid attribute in connection string: User." when connecting to a Sybase database

Problem

The following script action was used to attempt to connect to a Sybase database:

lr_db_connect("StepName=Connect",

"ConnectionName=DatabaseConnect",

"ConnectionString=Driver=Sybase System 11;Server=<server_name>;Database=<db_name>;Trusted_Connection=False;User=<uname>;Password=<pword>",

"ConnectionType=ODBC",

LAST);

However this resulted in error messages being reported as follows:

Action.c(6): Error: DB Connection failed {"ERROR [HY000] [INTERSOLV][ODBC SQL Server driver]Insufficient information to connect to the data source.

ERROR [01S00] [INTERSOLV][ODBC SQL Server driver]Invalid attribute in connection string: User.

ERROR [01S00] [INTERSOLV][ODBC SQL Server driver]Invalid attribute in connection string: Server.

ERROR [01S00] [INTERSOLV][ODBC SQL Server driver]Invalid attribute in connection string: Trusted_Connection.

ERROR [HY000] [INTERSOLV][ODBC SQL Server driver]Insufficient information to connect to the data source.

Cause

The connection string specified in the lr_db_connect() function:

"ConnectionString=Driver=Sybase System 11;Server=<server_name>;Database=<db_name>;Trusted_Connection=False;User=<uname>;Password=<pword>",

is not valid and cannot be used to connect to a Sybase database.

Fix

The correct connection string to use when connecting to a Sybase database is as follows:

"ConnectionString=DRIVER={Sybase System 11};UID=<uname>;PWD=<pword>;SRVR=<server_name>;DB=<db_name>",

While the above connection string is applicable when accessing a Sybase database, other connection string formats are applicable for other database technologies.

Leave a Comment