Forums

This topic is locked

error after following tutorial

Posted 10 Jul 2002 00:12:21
1
has voted
10 Jul 2002 00:12:21 Cycie Cycie posted:
ultradev.buzzinet.co.uk/extensions/child_dropdown/tutorial/index.asp

i followed this tutorial and did everything what's in it, but just getting the following error

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC Microsoft Access-stuurprogramma] Gegevenstypen komen niet overeen in criteriumexpressie.

/testasp/TMPul9czz05oq.asp, line 22

so i think the problem is in this line :

rsChildDropDown.Source = "SELECT * FROM child_table WHERE grouptype = '" + Request.Form("myParent" + "'"
where grouptype expects a number but gets a string

how can i fix this?

Replies

Replied 11 Jul 2002 03:06:27
11 Jul 2002 03:06:27 b w replied:
probably a datatype problem. Make sure the thing you are selecting(drop down) has the same datatype as the data you are selecting in the database.



Edited by - biffysix on 11 Jul 2002 03:06:55
Replied 11 Jul 2002 17:31:40
11 Jul 2002 17:31:40 Cycie Cycie replied:
yes, that is all standing ok

if i change the datatype from number to text, then i all works ok.... but i just want this to test with the numeric fields.

so can nobody help me and say how to build up that recordset-query so that i works?
Replied 12 Jul 2002 19:58:50
12 Jul 2002 19:58:50 scre wdanger replied:
Well you can't compare number with text. They should be both of the same type.
Make another Field in your database Like TypeID, make it a numeric
column and have it refer to the id field of the corresponding type.
This should work.
Replied 12 Jul 2002 20:24:08
12 Jul 2002 20:24:08 Cycie Cycie replied:
it has already been fixed

it was :
"SELECT * FROM child_table WHERE grouptype = " + Request.Form("myParent"

it should be

"SELECT * FROM child_table WHERE grouptype = '" & Request.Form("myParent"

<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> thanks for helping pepps

Reply to this topic