Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
regarding connection string
#2
Solved: 10 Years, 10 Months, 1 Week ago
Hi,

This might be useful to you.

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


Regards,
Sankalp
Reply


Messages In This Thread
regarding connection string - by soumya - 12-06-2011, 10:16 PM
RE: regarding connection string - by sshukla12 - 12-07-2011, 11:55 AM
RE: regarding connection string - by ravi.gajul - 12-07-2011, 12:12 PM

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

Forum Jump:


Users browsing this thread: 1 Guest(s)