01-20-2009, 04:32 PM
Thanks,
I wrote a function for database connection and select query, but i can't retrieve data from the function. if u know the way please let me know... thanks.
my function
Regards,
Amila
I wrote a function for database connection and select query, but i can't retrieve data from the function. if u know the way please let me know... thanks.
my function
Code:
Function ConnectDatabase()
dim Cnxn,strCnxn
dim rsCus,strSQL
set Cnxn = CreateObject("ADODB.Connection")
set rsCus = CreateObject("ADODB.RecordSet")
strCnxn ="DRIVER={Microsoft ODBC for Oracle};UID=amilar12;PWD=mypass;SERVER=TEST_DB_DOMAIN.ORG"
Cnxn.Open strCnxn
msgbox "connect"
strSQL ="select * FROM aa_mgr.jms_messages "
rsCus.Open strSQL,Cnxn
end function
Regards,
Amila