Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Need Assitance in connecting to IBM DB2 database

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,58645
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Need Assitance in connecting to IBM DB2 database
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Need Assitance in connecting to IBM DB2 database - 4/1/2008 8:36:39 AM   
  asnadig

 

Posts: 12
Score: 0
Joined: 4/1/2008
Status: offline
Original message moved by TNO
Reason :
Hi All,

I am trying to connect to a IBM DB2 database through VB Script.

Below is the connection string piece of code.

sUID = InputBox("Enter UserID: ","Enter User","YOUR USER ID")
sPassword = InputBox("Enter Password: ","Enter Password","YOUR PASSWORD")
sOutputOption = InputBox("Enter Screen Or File: ", "Enter Output", "Screen")

 
strConnect = "Database=dbptsu; Hostname=udbimdb-pts-uat.jpmorganchase.com,60020; DRIVER={IBM DB2 ODBC DRIVER}; UID=" & sUID & "" & ";PWD=" & sPassword &""

gDatabase.Open strConnect


When I run the script, I get an error "[IBM][CLI Driver] SQL1013N The database alias  name or database  name "" could not be found. SQLSTATE=42705

Can some one help me in fixing the error?

Regards,
ASN
 
 
Post #: 1
 
 RE: Need Assitance in connecting to IBM DB2 database - 4/1/2008 11:03:13 AM   
  TNO


Posts: 1247
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
http://www.connectionstrings.com/?carrier=ibmdb2

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to asnadig)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Need Assitance in connecting to IBM DB2 database Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts