Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Connecting to Oracle from ASP ?
Hello;
I am using the code given below to connect to Oracle using ASP.
<%
Set DataConn = Server.CreateObject("ADODB.Connection")
DataConn.Open "DSN=ora;UID=scott;PWD=tiger"
Set DataCmd = Server.CreateObject("ADODB.Command")
'DataCmd.CommandText = "SELECT * from emp WHERE ENAME = '" &
Request.Form("Last_Name") & "'"
DataCmd.CommandText = "SELECT * from emp"
Set DataCmd.ActiveConnection = DataConn
Set rs_main = Server.CreateObject("ADODB.Recordset")
Set rs_main = DataCmd.execute
%>
I have useed the "Oracle ODBC test" utility to check the connectivity of
ODBC and everything is fine. But the code above from an ASP page does not
return me anything from the Database upon querying. The record set is not
returning any value on the web page. I am not getting any error messages
also.
Can anybody help me out with this ?
Thanks,
Faiz
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: FAIZ QURESHI INET: faizq_at_hotmail.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon Nov 19 2001 - 03:49:13 CST
![]() |
![]() |