on 2011 Aug 03 4:28 AM
Hi I am using VBscript (QTP) facing an issue in making an connection to database (Sybase 15.0 ) since in the DbPassword has semicolon in the end .For e.g. Test123;
Below is the piece of code used where paramters are passed
set adoConn=Createobject("ADODB.Connection") adoConn.ConnectionTimeout =600 adoConn.Open ("DRIVER={Sybase ASE ODBC Driver};NA=" & sDBServerName & "," & sDBPortNo & " ;DB=" & sDBName & ";UID=" & sDBUserID & ";PWD=" & sDBPassword & " ;")
is there a way using which i can escape the ';' in vbscript please help!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Additional Info : in VBscript ';' semicolon is taken as a literal if placed inside a "". ie sDBPassword = "Test;" will take ';' as a part of string , however connection sting is
("DRIVER={Sybase ASE ODBC Driver};NA=myNewServer,6400;DB=TestDb;UID=keshava;PWD=Test;;") this when passed as a connection string ignores the semicolon in the end and takes the password as Test
Request clarification before answering.
This forum is dedicated to SQL Anywhere, which is a different product from ASE.
For SQL Anywhere this question is moot since passwords cannot contain semicolons: http://dcx.sybase.com/index.html#1201/en/dbadmin/permissi-s-5614688.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
9 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.