|
|
|
|
|
| | |
|
Active Server Pages ASP ASP.NET .aspx .ascx Web HTML Developer Internet Microsoft Web Services Visual Studio .NET CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Need help on taking info from more than one table in a db from an ASP page [URGENT] |
From: |
rtfm-now |
Date: |
5/27/2001 4:45:26 PM |
IP: |
62.0.96.120 |
I have a db called db.mdb (MS-Access 97) and I have there two tables (texts & projects). I also have an asp file (default.asp) and on two different place inside this asp page I wonna call to info stored in the db, in one place of the page to info in the texts table and in other place in the asp page to the info in the projects table.
How can I do it? I tried to use to connections like this:
<%
On Error Resume Next
Response.Write "<table border=Ƈ' cellpadding=Ɔ' cellspacing=Ɔ' width=颼%' bordercolor='white'>"
Response.Write "<tr width=颼%'><td width=颼%' bgcolor='black'><div align='center' valign='top'>"
Response.Write "<font size=ƈ' color='white'><b>:: Texts ::</b></font></div></td></tr>"
Response.Write "<tr width=颼%'><td width=颼%'>"
Response.Write "<table border=Ƈ' cellpadding=Ɔ' cellspacing=Ɔ' width=颼%' bordercolor='black'>"
Response.Write "<tr width=颼%'><td width=颼%' bgcolor='silver' dir='rtl'><div align='right'>"
Response.Write "<font size=ƈ' color='black'><b>"
Set C = Server.CreateObject("ADODB.Connection")
C.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/site.mdb"))
Set R = Server.CreateObject("ADODB.Recordset")
R.ActiveConnection = C
R.Open "SELECT TOP 10 id, title FROM texts ORDER B |
Follow Up - Re: Need help on taking info from more than one table in a db from an ASP page [URGENT] - J. Paul Schmidt 5/28/2001 9:50:22 PM
|
|

|
|
|
|
|
|
|
|
|
|