If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > oracle 8i connecting problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-19-04, 17:51
peaceful_girl peaceful_girl is offline
Registered User
 
Join Date: Mar 2004
Posts: 1
oracle 8i connecting problem

After the code has worked ,now it is not any more althought that i change nothing in it . after i install the oracle developer for the form i can't connect to the oracle tables i have tried alot of other provider i don't know what is wrong with the code . does the developer change something. i have named the database in the developer with other name not like the database name . am using the server and everything is here . do i need special program or provider for that .



<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>
Reply With Quote
  #2 (permalink)  
Old 03-20-04, 00:26
j_sakthivel j_sakthivel is offline
Registered User
 
Join Date: Mar 2004
Location: chennai
Posts: 25
hi

what error u r getting....
in data source field u give the name of the server's system name.

whether the data source name db1 is correct or not.just check once..
__________________
Sakthi
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On