Hi,
U can use the below code, it might help u.
Let me know if this is helpful 2 u.
Regards,
Sankalp
U can use the below code, it might help u.
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 this is helpful 2 u.
Regards,
Sankalp