Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 19th, 2004, 06:19 PM
Registered User
 
Join Date: Mar 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default connecting problem

what do i need to connect the oracle 8i using asp code . i got the code and it connected and after time it didn't work i used the MSDAORA provider . do i need a special program or something to use different provider or what i hope that sone one will help me in this because am in need of this help for my project .

i used this code and it was fine but after i install the oracle form developer it didn't work . should i use the same of the database in the form developer .

<HTML>
<HEAD>
<TITLE>Connecting to an Oracle database using OLE and DSNLess connection</TITLE>
</HEAD>
<BODY>
<%

SET myConn=SERVER.createobject("adodb.connection")
myConn.Open "Provider=MSDAORA; Data Source=db1;" & _
"User ID=scott;" & "Password=tiger"
SQLStr="SELECT empno, ename, deptno FROM Emp ORDER BY deptno, ename"
SET result=myConn.execute(SQLStr)
IF NOT result.EOF THEN
response.write("<H2>Oracle ASP Example</H2>")
response.write("<P>Connecting to Oracle using OLE & DSNLess connection</P>")
response.write("<TABLE BORDER=3 BGCOLOR=#0099CC><TR>" & _
"<TH>Employee No</TH><TH>Name</TH><TH>Department No</TH>")
WHILE NOT result.EOF
response.write("<TR><TD>" & result("empno") & "</TD>")
response.write("<TD>" & result("ename") & "</TD>")
response.write("<TD>" & result("deptno") & "</TD></TR>")
result.movenext()
WEND
response.write("</TABLE>")
ELSE
response.write("<P>Error retrieving Employee data!!</P>")
END IF

%>
</BODY>
</HTML>

Peace
 
Old March 19th, 2004, 09:20 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

use provider as

 MSDAORA.1

conn.connectionstring="Provider=MSDAORA.1;data source=db1;user id=scott;password=tiger;"







Similar Threads
Thread Thread Starter Forum Replies Last Post
Data connecting problem zzw_typ BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 May 30th, 2007 06:50 AM
connecting to IIS problem in my laptop mkayombo Access 1 July 30th, 2005 02:21 AM
problem in connecting jdbc and sql ankit_29882 Java Databases 2 April 6th, 2004 02:20 PM
Problem with connecting to database learnasp All Other Wrox Books 1 December 18th, 2003 06:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.