mr_chinchin25 -
Joined: 01 Dec 2003 Posts: 1
|
Posted: Mon Dec 01, 2003 6:37 pm Post subject: Problem getting information from Access |
|
|
Ok here goes. I've setup Abyss Web Server, I've downloaded and setup AHTML (as far as I'm aware its working, theres no ASP errors), I've set up a DSN for the database in question in the ODBC Manager.
The Link to the database has been verified by Frontpage.
Now I'm doing a little test database, just to get a few lines from a table within access, but nothing is brought back at all?
The script I'm using is as follows-
At the very top of the page-
<%@ Language = VBScript %>
Then under the Body bit
<% Set MyConnection = Server.CreateObject ("ADODB.Connection") MyConnection.Open "Matt" %>
<% Set MyConnection = Server.CreateObject ("ADODB.Connection") MyConnection.Open Application ("MyConnection_ConnectionString") Set MyRecordset = MyConnection.Execute ("SELECT * FROM main") %>
Where "Matt" is the name of the ODBC connection thing, and "main" is the name of the table.
Then the code to retrieve the info- (I've missed out bits of the table code!)
<% Do Until MyRecordset.EOF %>
<tr>
<td width="50%"><% =MyRecordset ("Name")%> </td>
<td width="50%"><% =MyRecordset ("Age")%> </td>
</tr>
<%
MyRecordset.MoveNext
Loop
%>
Has anyone got a clue whats wrong here??
Thanks..
PS. XP home, Access/Frontpage 2002 |
|