Stefan
Wed Mar 09 03:31:28 CST 2005
FYI
Date and Time are reserved VBscript words and should never be used for DB Field names
Rename your DB fields in your DB and scripts
--
_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
_____________________________________________
"John" <im@home.net> wrote in message news:561s215haq860vifdq76cd356anendifld@4ax.com...
| Hi Jon,
| Thanks again.
| Here is the code I use to connect and open the Access table.....
|
| Set objConn = Server.CreateObject("ADODB.Connection")
| Set objRS = Server.CreateObject ("ADODB.Recordset")
| filepath=Server.MapPath("redlion.mdb")
| objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
| FilePath & ";"
| objRS.Open "calendar", objConn, adOpenStatic, adLockReadOnly,
| adCmdTable
|
| Here is the code to display each field and then close the table and
| connection...
|
| While Not objRS.EOF
| %>
| <tr>
| <td class="eventdate"><% =objRS("Date") %></td>
| <td class="eventtime"><% =objRS("Time") %></td>
| <td class="eventprice"><% =objRS("Price") %></td>
| <td class="eventband"><% =objRS("Band") %></td>
| <td class="eventbandlink"><% =objRS("Weblink") %></td>
| </tr>
| <tr>
| <td colspan="5" class="eventbandsummary"><%
| =objRS("Summary") %></td>
| </tr>
| <tr></tr>
| <% objRS.Movenext
| Wend
| objRS.Close
| objConn.Close
| Set objRS=Nothing
| Set objConn=Nothing
| %>
|
| Here is the SQL query that Access came up with to sort the "Date"
| field in ascending order...
|
| SELECT calendar.Date FROM calendar ORDER BY calendar.Date;
|
| The trouble is, as I said before, the error code reported is looking
| for the VBScript CASE keyword.
|
| I'm not even sure where I should be placing the query?
|
|
|
| On Tue, 8 Mar 2005 17:21:02 -0000, "Jon Spivey" <jons@mvps.org> wrote:
|
| >Hi John,
| >
| >If your server supports databases it will support sql. The confusion might
| >have arisen because select is a vbscript keyword as well as an sql one -
| >they do totally different things. Post up the code you have so far and we'll
| >soon get this working.
|