Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parameter passing from web to db

Status
Not open for further replies.

Christiana

Technical User
Apr 24, 2001
21
0
0
CY
I have the following code in my ASP file

mySQL="PARAMETERS agwgos TEXT,ktisma TEXT,ydatopyrgos TEXT,fterwti TEXT,mylopetra TEXT,eparxiaid NUMBER,idioktisia TEXT;"
mySQL ="SELECT WATERMILL.WatermillID,[Dimos/Koinotita],[TOPOGRAFIKESPLIROFORIES].Toponymio "
mySQL =mySQL & "FROM WATERMILL INNER JOIN TOPOGRAFIKESPLIROFORIES ON WATERMILL.WatermillID =TOPOGRAFIKESPLIROFORIES.WatermillID "
mySQL =mySQL & "WHERE( (" & agwgosbool & " OR "
mySQL =mySQL & "(EXISTS (SELECT [AGWGOS NEROU].[WatermillID] FROM [AGWGOS NEROU] WHERE [AGWGOS NEROU].Typos='" & agwgos & "' ))) AND "
mySQL =mySQL & "(" & ktismabool & " OR ( EXISTS (SELECT [VOITHITIKO KTIRIO].[WatermillID] FROM [VOITHITIKO KTIRIO] WHERE [VOITHITIKO KTIRIO].Typos='" & ktisma & "' ))) AND "
mySQL =mySQL & "(" & ydatopyrgosbool & " OR ( EXISTS (SELECT [YDATOPYRGOS].[WatermillID] FROM [YDATOPYRGOS] WHERE [YDATOPYRGOS].Typos='" &ydatopyrgos& "' ))) AND "
mySQL =mySQL & "(" & fterwtibool & " OR ( EXISTS (SELECT [FTERWTI].[WatermillID] FROM [FTERWTI] WHERE [FTERWTI].Typos='" &fterwti& "' ) )) AND "
mySQL =mySQL & "(" & mylopetrabool & " OR ( EXISTS (SELECT [MILOPETRA].[WatermillID] FROM [MILOPETRA] WHERE [MILOPETRA].Typos='" & mylopetra & "' ))) AND "
mySQL =mySQL & "(" & eparxiaidbool & " OR ( [WATERMILL].eparxia=eparxiaid)) AND "
mySQL =mySQL & "(" & idioktisiabool & " OR ( [WATERMILL].EidosIdioktisias='" & idioktisia & "' ))) "
mySQL =mySQL & "ORDER BY [WATERMILL].eparxia DESC;"


I have declared these variables:

dim agwgos,ktisma,ydatopyrgos,fterwti,mylopetra,eparxiaid,idioktisia
dim agwgosbool,ktismabool,ydatopyrgosbool,fterwtibool,mylopetrabool


I still get this message when I am trying to run it

Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters

/projects/WATERMILL/advancesearchresults.asp, line 82


PLS HELP
Thank you in advance
 
sometimes it help A LOT when you output the mySQL string first to screen, before executing it.
Eg

response.write mySQL
response.end

then you can study your complete SQL statement. . . .
Compared to this SQL my SQL statements belong to kindergarten, but i found [Dimos/Koinotita] somewhat strange...
br
Gerard
(-:

Better a known bug then a new release.


| Do it!
|
V
 
Thanks 4 u r help. I finally found the mistake.
And since [Dimos/Koinotita] was all greek to you ...
Guess what, it is actually greek with latin characters !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top