Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP to MS Access Connection 2

Status
Not open for further replies.

haneen97

Programmer
Dec 10, 2002
280
US
Hi Team,
I have this simple page to display the contents of a table in a database on the local machine as you can tell. All I get is the header line. I don't get any error or anything. Just a blank page. The table has data. Please help



<%
<%@ LANGUAGE = VBScript %>
<% Option Explicit %>
<%
'*****************************************************
'* Code written by XXXXXXX *
'*****************************************************
%>

<HTML>
<BODY BGCOLOR="White" topmargin="10" leftmargin="10">
<B>Here are the specialties:<B><BR>
<%
dim MyConn
dim RS
dim DbPath

DbPath = Server.MapPath("C:\aRxSoft\DB\RxSoft.mdb")
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DbPath
Set RS = Server.CreateObject("ADODB.Recordset")
Set RS = MyConn.Execute("SELECT * FROM Specialty")
'Loop through the recordset
Do While not RS.EOF

'Write the HTML to display the current record in the recordset
Response.Write ("<br>")
Response.Write (RS("Specialty_Id"))
Response.Write ("<br>")
Response.Write (RS("Specialty"))
Response.Write ("<br>")
Response.Write (RS("Degree"))
Response.Write ("<br>")

'Move to the next record in the recordset
RS.MoveNext

Loop

RS.Close
set RS = Nothing
set MyConn = Nothing
%>
</BODY>
</HTML>


Thanks

Mo
 
I read it some where. But as I am reading the help files. I think I am not supposed to create more than one asp site on the same computer. The documentation says, if I need to, I should think about a server environment. I am trying to move my site to our test server now.

Mo
 
Mo....this post is getting too long...do you have a chat program/sn? this way i can walk you through it

Brian
 
Yes, do you have MSN Messanger Brian? I have Yahoo alos but I would have to download the program first.

Thanks

Mo
 
mo...msn's site is having problems..i can't even get to their "onlin" msn chat verion...if possible d/l yahoo...bslintx is my handle

Thanks
 
click start >

adminstrative tools >

Internet information services >

then open the tree menu on the right side where it says default site, until you see the listing of files

then right click on the default part and choose add virtual directory

a wizard will open pic a name for the site(no spaces)
then choose the directory where the site is located(ex. d:/websites/mynewsite/)

that should do it
 
I got yahoo messanger to work if that works for you.

Mo
 
yahoo is open for me...go ahead and get me with bslintx....steven is right on his way...i do it a lil differently however...waiting for your response

Brian
 
steven...i believe your way is on an actual server...he was using xp pro

rt click my comp>manage>iis

Brian
 
actually since he is running iis on his machine in a sense it's acting as a webserver

Also on my laptop i'm running win xp pro, and i use the start >admin tools method
 
well....there are 2 ways ;-) problem was solved...fix action>>>>was running on machine(browser) not iis like it was an html file and path was wrong...his code was fine...just minor fixes..mo says thanks...hence the star...later
Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top