Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating Connection string for DB2
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

Could u please try this:


Code:
Function GetDataFromBase(DNS,UID,PWD,QUERY)

    Set MyConnection = CreateObject("ADODB.Connection")
    Set myrecordset = CreateObject("ADODB.recordset")

    MyConnection.ConnectionString ="DSN=" & DNS  & "; UID=" & UID & ";PWD=" & PWD

    MyConnection.Open
    Set myrecordset = MyConnection.Execute(QUERY)
    GetDataFromBase = myrecordset(0)
    MyConnection.Close

End Function

Let me know if its work's 4 u.

Regards,
Sankalp
Reply


Messages In This Thread
Creating Connection string for DB2 - by sqadri - 04-13-2012, 03:34 AM
RE: Creating Connection string for DB2 - by sshukla12 - 04-13-2012, 10:35 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] Connection String for Oracle robertosalemi 6 12,282 01-15-2016, 04:51 PM
Last Post: robertosalemi
  DB2 Connect connection with IE 11 SRP 1 2,619 12-18-2015, 12:41 PM
Last Post: vinod123
  IBM DB2 connection with VB script bmurali 2 10,901 12-18-2015, 12:38 PM
Last Post: vinod123
  Connection with HP ALM hachem 0 2,616 02-26-2015, 04:36 PM
Last Post: hachem
  “Cannot connect to 8822 (connection timed out)" Ikbal 0 2,127 12-08-2014, 11:38 PM
Last Post: Ikbal

Forum Jump:


Users browsing this thread: 1 Guest(s)