If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Vbscript-Sybase connection string issue password has a semicolon in end

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-04-11, 03:13
KeshavaShukla KeshavaShukla is offline
Registered User
 
Join Date: Aug 2011
Location: house
Posts: 1
Vbscript-Sybase connection string issue password has a semicolon in end

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

password ase
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On