|
Hi,
I have written some ASP code that queries an access database. Everything works fine, but when I query a databasefield which has the date/time format I get the following error
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
It's in the following sql query:
SELECT [orders pkw].[afl adres] as afl_adres,[orders pkw].[catogorie],[orders pkw].[prijsstelling],type,line,stallingsdd,levertijd,kleur,bekleding,automaat,uitvoering,[orders pkw].[Produktie maand] AS productiemaand,vraagprijs,kommnr,[orders pkw].[Uiterste wijz datum DCNL] AS uiterste_wijz,[orders pkw].[Convnr Autoline] AS convnr_aline,reserveringen from [orders pkw] where [orders pkw].[model]='V' and levertijd='31-12-2005' ORDER BY [orders pkw].[code];
I guess the error comes from the where clause, databasefield levertijd='31-12-2005'
I've set the page's locale to 1043 with this line of code:
@LCID=1043
I don't know what I'm doing wrong, because when I open the access database, the date/time fields contain the same date as the date I query the database for.
|
|
|
Hi!
In MS ACCESS data base you must make the querry on date using the tags #23-05-2005#
It does not accept '23-05-2005'
|
|
|
Great, thanks. I will try that this week.
|
|
|
|
|
|
|
// |