Running two tables at once (1 Viewer)

KugarWeb

New member
Local time
Today, 14:29
Joined
Jun 17, 2007
Messages
1
Hi there,

I'm currently having problems pulling data out of the same database but out of two different tables, namely tbMeeting and tbLinks which will appear on the same page.

What I'm trying to do is reference the data on the same page, which includes a field from tbMeeting and 3 fields from tbLinks. However, I'm having problems when trying to keep the connection to the database open so that the information for the Links can be implemented, although I cannot seem to just take out or put in the connection code for opening or closing on one of the pages.

The tbMeeting data is going straight into an includes file, although I would much prefer not to do this with the tbLinks data, since it would help with the Search Engine Optimisation if the search engines were be able to pick up the urls and link titles.

I am coding within XHTML and Microsoft Access for the database itself. Below is the source code for the database connection on both tables.


tbLinks
Code:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!--#include file="includes/addXHTML.asp"-->
<%
var rsLink = Server.CreateObject("ADODB.Recordset");
rsLink.ActiveConnection =  "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("update/swshadow.mdb")
rsLink.Source = "SELECT * FROM tbLink ORDER BY linkID";
rsLink.CursorType = 1;
rsLink.CursorLocation = 2;
rsLink.LockType = 1;
rsLink.Open();

%>

tbMeeting
Code:
<!--#include file="addXHTML.asp"-->
<%
var rsNextMeeting = Server.CreateObject("ADODB.Recordset");
rsNextMeeting.ActiveConnection =  "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("update/swshadow.mdb")
rsNextMeeting.Source = "SELECT TOP 1 * FROM tbEvent WHERE nextMeeting >= Now()   ORDER BY nextMeeting ASC";
rsNextMeeting.CursorType = 1;
rsNextMeeting.CursorLocation = 2;
rsNextMeeting.LockType = 1;
rsNextMeeting.Open();

I'm using Microsoft Access 2003 to create the database and the following error message is displayed.

Microsoft JET Database Engine (0x80004005)
Could not use ''; file already in use.
/www.swshadowsMay/includes/meetingDate.asp, line 4
 

Users who are viewing this thread

Top Bottom