...

View Full Version : connecting to oracle 8i via ASP



alex80
07-25-2002, 07:33 AM
howdy ho


can somebody tell me what is the easiest way to connect to an oracle database? via asp? thanx!!



PS:um, did this site change in the last 2 months? my account was disabled and the layout looks different but im sure it was this site!..

ReyN
07-25-2002, 02:24 PM
hi

you connect to oracle just like you connect to any db in asp. the connection string to use is:

Provider=MSDAORA.1;Data Source=path to database on server :D

alex80
07-30-2002, 08:09 AM
um, ok, suppose im stupid, just supose, so what exaclty do i have to write in my file in the place of the folowing code wich works with access to connect to my oracle 8idatabase??

<%
strconn="DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.mappath("db2.mdb")
set conn=server.createobject("adodb.connection")
Conn.open strconn
%>

ReyN
07-30-2002, 02:05 PM
okay

using your existing setup:

<%
strconn="Provider=MSDAORA.1;Data Source=dbName"
set conn=server.createobject("adodb.connection")
Conn.open strconn
%>

that should do it, unless you have access restrictions built into the db, in which case you would need to pass (not sure about the exact syntax) uid= and pwd= parameters as well.

one other thing you can do is to create a file DSN that connects to an oracle db on your localhost, open the DSN file, and use the connection string generated on that file in your setup above. :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum