Hmm. Daar zit wat in ja. Het is gewoon een 1bit field dus 1 of 0 ja. Maar waarom krijg ik dan deze foutmelding:
----
Microsoft JET Database Engine fout '80040e07'
Data type mismatch in criteria expression.
/online/kamers.asp, regel 121
----
in het volgende stukje script:
(Het gaat om de Boolean vars want als ik die in de INSERT INTO SQL-query weglaat dan loopt het script prima.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| If Wasmachine = "ja" then xWasmachine = True
If Wasmachine = "nee" then xWasmachine = False
If Koelkast = "ja" then xKoelkast = True
If Koelkast = "nee" then xKoelkast = False
If Stereo = "ja" then xStereo = True
If Stereo = "nee" then xStereo = False
If TV = "ja" then xTV = True
If TV = "nee" then xTV = False
If Beddegoed = "ja" then xBeddegoed = True
If Beddegoed = "nee" then xBeddegoed = False
If Fiets = "ja" then xFiets = True
If Fiets = "nee" then xFiets = False
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inetpub\database\ifmsa.mdb"
SQL_query = "INSERT INTO Users (Voornaam, Achternaam, Email, Adres, Postcode, Plaats, Telefoon) VALUES ('" & Voornaam & "', '" & Achternaam & "', '" & Email & "', '" & Adres & "', '" & Postcode & "', '" & Plaats & "', '" & Telefoon & "')"
Set RS = MyConn.Execute(SQL_query)
SQL_query = "INSERT INTO Kamers (PeriodeStart, PeriodeEinde, Grootte, Prijs, Keuken, Badkamer, Toilet, Wasmachine, Koelkast, Stereo, TV, Beddegoed, Fiets) VALUES ('" & PeriodeStart & "', '" & PeriodeEinde & "', '" & Grootte & "', '" & Prijs & "', '" & Keuken & "', '" & Badkamer & "', '" & Toilet & "', '" & xWasmachine & "', '" & xKoelkast & "', '" & xStereo & "', '" & xTV & "', '" & xBeddegoed & "' , '" & xFiets & "');"
[121]Set RS = MyConn.Execute(SQL_query)
RS.Close
MyConn.Close |