I need help PLEASE!!
I have the following code that works as it should: Keeping in mind the Uid and Pwd MUST be hard coded…..
strConn = "Driver={SYBASE ASE ODBC Driver};NA=REPORTSNAME,4100;Uid=ME;Pwd=MYPW;database=MYDATABASE;"
However, I want to use this code applying a variable for the “UID” and the “PWD” to avoid the HARD CODING. So let’s assume UID=ME and Pwd=MYPW:
I want this:
Dim myLoginID, myPass, Sql as string myLoginID="ME" myPass="MYPW" Sql = "Driver={SYBASE ASE ODBC Driver};" + "NA=REPORTSNAME,4100;" + "Uid=MyLoginID;" + "Pwd=myPass;" + "database=DATABASENAME;"
but the connection fails because it doesn’t recognize the variables, myLoginID and myPass. I’ve been told it must be in string format (from looking at it, I thought it was, but what do I know), anyway, I tried this:
Sql = "Driver={SYBASE ASE ODBC Driver};" + _ Sql = "NA=REPORTSNAME,4100;" + _ Sql = "Uid=myLoginID;" + _ Sql = "Pwd=myPass;" + _ Sql = "database=DATABASE;"
but the connection fails.
What am I not understanding or overlooking?