The forum will be down for scheduled maintenance on Saturday, March 4 beginning at 10am EST. Actual downtime is unknown but may be several hours.

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

This question is marked "community wiki".

asked 03 Aug '11, 03:28

KeshavaShukla's gravatar image

KeshavaShukla
1114
accept rate: 0%

edited 03 Aug '11, 09:41

Volker%20Barth's gravatar image

Volker Barth
29.5k291441646

The question has been closed for the following reason "Question is off-topic or not relevant" by Graeme Perrow 03 Aug '11, 08:54


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

permanent link

answered 03 Aug '11, 06:04

Breck%20Carter's gravatar image

Breck Carter
26.8k422580826
accept rate: 20%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×47
×10

question asked: 03 Aug '11, 03:28

question was seen: 3,837 times

last updated: 03 Aug '11, 09:41