Passing a variable and using this variable in a S

Results 1 to 2 of 2

Thread: Passing a variable and using this variable in a S

  1. #1
    Join Date
    Dec 1969

    Default Passing a variable and using this variable in a S

    I have an access database and am trying to display data from a few tables using asp. <BR><BR>When the user clicks on a button in my flash movie it calls the asp page to open.<BR><BR>I want to pass one variable to the asp page and use that in my SQL WHERE statement.<BR><BR>Im not sure if i have an asp coding error or flash error so ill show both pieces of code.<BR><BR>here is the SQL statement.<BR>************************************ ***<BR> strSQL = "SELECT DevelopmentName, LandID, CityID, DevelopmentWebsite, DevelopmentPrice, DevelopmentBedrooms, DevelopmentBathrooms, DevelopmentSqFeet FROM Developments WHERE ZoneID =" & Request.Form("Zone") & ";"<BR>****************************************<BR ><BR>Here is the error<BR>***************************************<B R>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e10&#039 <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. <BR><BR>/pages/canada/ResidentialListings.asp, line 28 <BR>****************************************<BR><B R>here is the flash button code<BR>*************************************<BR>O n (Release)<BR> Load Variables ("../ResidentialListings.asp", "", vars=POST)<BR> Set Variable: "Zone" = "R"<BR> Get URL ("../ResidentialListings.asp", window="main", vars=POST)<BR>End On<BR>***************************************<BR>< BR>This is driving me nuts so any help would be appreciated.

  2. #2
    Ian Lane Guest

    Default RE: Passing a variable and using this variable in

    I&#039m no expert at this, but that &#039Too few parameters&#039 error message is &#039age old&#039. This is vbscript not vb. I don&#039t think the ";" on the end of the statement is required let alone allowed anymore! (Just to throw another spanner into our memory works!) Then I would check to see if the SQL statement will work WITHOUT the WHERE clause.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts