Jeg har lavet det nedenstående til udregning af fragtpriser, men
får konstant denne fejl:
Error Type:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
Hvad skal jeg gøre??
Håber at nogen kan/vil hjælpe!
På forhånd mange mange tak!
MVH
Lars Mortensen
koden er som følger:
-------------------
fragtvaegt = Session("fragtvaegt")
If fragtvaegt <= 1000 Then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 1000"
'32
Elseif fragtvaegt > 1000 and fragtvaegt <= 2000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 2000"
Elseif fragtvaegt > 2000 and fragtvaegt <= 3000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 3000"
'40
Elseif fragtvaegt > 3000 and fragtvaegt <= 4000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 4000"
Elseif fragtvaegt > 4000 and fragtvaegt <= 5000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 5000"
Elseif fragtvaegt > 5000 and fragtvaegt <= 6000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 6000"
Elseif fragtvaegt > 6000 and fragtvaegt <= 7000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 7000"
'57
Elseif fragtvaegt > 7000 and fragtvaegt <= 8000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 8000"
'61
Elseif fragtvaegt > 8000 and fragtvaegt <= 9000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 9000"
Elseif fragtvaegt > 9000 and fragtvaegt <= 10000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 10000"
Elseif fragtvaegt > 10000 and fragtvaegt <= 11000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 11000"
Elseif fragtvaegt > 11000 and fragtvaegt <= 12000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 12000"
Elseif fragtvaegt > 12000 and fragtvaegt <= 13000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 13000"
'80
Elseif fragtvaegt > 13000 and fragtvaegt <= 14000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 14000"
Elseif fragtvaegt > 14000 and fragtvaegt <= 15000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 15000"
Elseif fragtvaegt > 15000 and fragtvaegt <= 16000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 16000"
'92
Elseif fragtvaegt > 16000 and fragtvaegt <= 17000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 17000"
Elseif fragtvaegt > 17000 and fragtvaegt <= 18000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 18000"
'101
Elseif fragtvaegt > 18000 and fragtvaegt <= 19000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 19000"
Elseif fragtvaegt > 19000 and fragtvaegt <= 20000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = 20000"
Elseif fragtvaegt > 20000 then
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = max"
Else
sqlFragt = "SELECT * FROM shipmethods WHERE shipmethod = max"
End if
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials