I found a way.. but it didnt quite solve my problem.
I found this:
http://easyweb.easynet.co.uk/~trevor/AccFAQ/queries.htm
How can I generate a sequence of numbers (like record numbers) in a query?
n a module:
(declarations)
Option Explicit
Dim mlngCounter As Long
Function ResetCounter()
mlngCounter = 0
End Function
Function GetNextCounter(pvar As Variant) As Long
mlngCounter = mlngCounter + 1
GetNextCounter = mlngCounter
End Function
In the Query:
Select [feilds...], ResetCounter(), GetNextCounter([a valid column]) From table
So.. this works fine in Acess.. But I need to access the db through olebd in frontpage. And thats where it stops working. It gives me this error:
Server error: Unable to retrieve schema information from the record source 'WebCountryRanking' in a database using the connection string:
'DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=fpdb/condorcup.mdb'.
The following error message comes from the database driver software; it may appear in a different language depending on how the driver is configured.
-------------------------------------------------------
[Microsoft][ODBC Microsoft Access Driver] Undefined function 'ResetCounter' in expression.
Source: Microsoft OLE DB Provider for ODBC Drivers
Number: -2147467259 (0x80004005)
Seems like you cant execute code through oledb..
Now, does anyone have an idea ? Let me give you some more context:I’m trying to publish race results on the site dynamically from an access DB. Since I’m not much of a programmer, I’m using Frontpage with the “database results wizard” (ASP).
Assume an access query which gives me competition number, name, score,.. I can publish that with no problem, even add the correct flag and all that, but what I cant do is add this ranking column (1,2,3,4,5,..). Its not possible to hardcode this in HTML due to the way DRW works, so I tried adding it in Access, with the above trick, but that only works in Access, not through oledb.
I'm desperate here, and the clock is ticking.. anyone have an idea ?
Vertigo