jlesch
13 years agoNew Contributor
Connect to Oracle Database with VBScript
Hi,
I am trying to connect to a Oracle 10g Express database. I am using VBScript and I just can't get it to connect. I am trying the code below and get a ORA-12537: TNS:connection closed error.
The oracle express database is installed on the same computer, not going though a network or anything.
sub OracleConnection
'creates a query
set Qry = ADO.CreateADOQuery()
'specifies the connection string
Qry.ConnectionString = DDT.ADODriver("Driver=Microsoft ODBC for Oracle;Server=127.0.0.1:8080;Uid=userID;Pwd=;password", "shipping_address")
'specifies the desired SQL
Qry.Sql = "SELECT * FROM shipping_address"
'executes the query
Qry.Open()
log.Message(Qry)
Qry.Close()
End Sub
I am thinking it has something to do with the connectionString, I am just not familiar enough with all of this to understand whats going on, even if I do google search I can't get it to work.
Any Help would be awesome.
Thanks
I am trying to connect to a Oracle 10g Express database. I am using VBScript and I just can't get it to connect. I am trying the code below and get a ORA-12537: TNS:connection closed error.
The oracle express database is installed on the same computer, not going though a network or anything.
sub OracleConnection
'creates a query
set Qry = ADO.CreateADOQuery()
'specifies the connection string
Qry.ConnectionString = DDT.ADODriver("Driver=Microsoft ODBC for Oracle;Server=127.0.0.1:8080;Uid=userID;Pwd=;password", "shipping_address")
'specifies the desired SQL
Qry.Sql = "SELECT * FROM shipping_address"
'executes the query
Qry.Open()
log.Message(Qry)
Qry.Close()
End Sub
I am thinking it has something to do with the connectionString, I am just not familiar enough with all of this to understand whats going on, even if I do google search I can't get it to work.
Any Help would be awesome.
Thanks