Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I should write one VB script that should retrieve data from one database
and display the same/store somewhere.
with google's help i wrote the below pgm but its not working..Option Explicit
Dim strConn
strconn = "Driver={Microsoft ODBC for Oracle};
"CONNECTSTRING=(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=SERVERNAME)(PORT=1521)
(CONNECT_DATA=(SERVICE_NAME=MYDB)));uid=user;pwd=pass;"
'Create the connection
Dim connection
Set connection = CreateObject("ADODB.Connection")
'open connection
connection.Open strconn
'sql query to retrieve data
result = connection.execute("select * from tablename")
Msgbox result
'close the connection
connection.closeerror I get is:
'provider is not specified and there is no designated default provider'In addition, I am running this script in microsoft windows server 2003R2 64-bit SP2.
i got oracle 10g client installed in my system.i have Host name,uid and pwd tat connect to the database..
b/w, what should we give for SERVICE_NAME.Please help...thanks in advance

![]() |
read file lines and store...
|
batch file to read last f...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |