02-26-2009, 03:45 PM
Below function will help to connect oracle data base.for SQL data base we have to provide required provider name.correct me if am wrong.
Public function openDatabase( byval userID, byval passwd, byval dataBase, byval sql, byref conn,byref rs)
Public function openDatabase( byval userID, byval passwd, byval dataBase, byval sql, byref conn,byref rs)
Code:
set conn=createobject("adodb. connection")
set rs=createobject("adodb.recordset")
conn.open= "Provider=OraOLEDB.Oracle.1;Password=" & passwd & ";Persist Security Info=True;User ID=" &_
userID & ";Data Source=" & dataBase & ";"
rs.open sql,conn
End Function