Re: JDBC Connection Help




"clu" <josperjr@xxxxxxxxx> wrote in message
news:1141864254.670614.140070@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I need assistance with establishing a JDBC connection to an oracle
database in VBS.

I am familiar with VBA and ADODB connections but I am new to VBS and
JDBC. I have all the pieces I need and have been able to successfully
connect to the database with DbVisualizer but after spending several
days searching the web and newsgroups I am not sure what I am lacking
to make the connection.


ConectionString="DRIVER=oracle.jdbc.OracleDriver;URL=jdbc:oracle:thin:@<mc-n
ame>:<port-no>:<DbName>;uid=<uid>;pwd=<pwd>"

set con = CreateObject("ADODB.Connection")
con.open(ConectionString)
set RS = CreateObject("ADODB.Recordset")
RS.Open "Select * FROM PKG", con, 3, 3


The above code has been pieced together from my research and when it is
run it produces an error: [Microsoft][ODBC Driver Manager]Data source
name not found and no default driver specified

I have the correct driver 0jdbc.jar which from what I can tell contains
2 drivers which is where I got "oracle.jdbc.OracleDriver" from. This
driver was used to set up DbVisualizer but I am not clear how to use it
with the above code. Also, I am aware that I am using
CreateObject("ADODB.Connection") which does not seem correct as I am
trying to establish a JDBC connection.

The below information was provided to me along with the driver.
DB name: <DbName>
DB type: oracle/unix
DB UID: <uid>
DB PWD: <pwd>
URL: jdbc:oracle:thin:@<mc-name>:<port-no>:<DbName>

I am also interested in using the above information in a DSN file but I
am mostly concerned with creating the connection in vbs any way that I
can.

Thank you for any assistance and direction.

You might check if oracle has an oledb driver or odbc driver - it probably
does.
JDBC is used for java - ( JDBC=Java DataBase Connectivity)
Just use a different driver than JDBC.


.



Relevant Pages

  • Re: DBC Connection - Protocol error when execute Select
    ... I tested the Program which is shown at the Community wiki:http://community.ingres.com/wiki/Java_Example ... Connection aborted due to communications ... I used JDBC - Driver Version 3.2 with Ingres Release 9.2.0 but this ... JDBC - Version works works only with Version 9.1.0. ...
    (comp.databases.ingres)
  • Re: Jdbc connect to plain text
    ... u can create a DSN or DSN connection with the text file using the driver ... > "JDBC technology is an API that lets you access virtually any tabular ...
    (comp.lang.java.help)
  • JDBC Connection Help
    ... I need assistance with establishing a JDBC connection to an oracle ... database in VBS. ... I have the correct driver 0jdbc.jar which from what I can tell contains ...
    (microsoft.public.scripting.vbscript)
  • Re: Reestablishing a db connection after a network failure
    ... will instruct the driver to attempt to reconnect automatically. ... The MySQL JDBC ... whether it handles all cases of connection interruption. ... Implement the Data Access Object pattern, ...
    (comp.lang.java.databases)
  • Re: Reestablishing a db connection after a network failure
    ... will instruct the driver to attempt to reconnect automatically. ... The MySQL JDBC ... whether it handles all cases of connection interruption. ... Implement the Data Access Object pattern, ...
    (comp.lang.java.programmer)