Professional Web Applications Themes

recordset query not working - Dreamweaver AppDev

hello, im using asp and dreamweavers automated features. the following query works select * from table where dateexp >= now so expired enteries do not display BUT when i add a second parameter select * from table where dateexp >= now AND Make = 'varMake' varmake is defined as request.QueryString("select1"). im using the get method and submitting to the same page. why wont this work!!!!!!!...

  1. #1

    Default recordset query not working

    hello,

    im using asp and dreamweavers automated features.

    the following query works

    select * from table where dateexp >= now

    so expired enteries do not display BUT when i add a second parameter

    select * from table where dateexp >= now AND Make = 'varMake'

    varmake is defined as request.QueryString("select1").

    im using the get method and submitting to the same page.

    why wont this work!!!!!!!

    Don Pacino Guest

  2. #2

    Default Re: recordset query not working

    HI! Don
    Try AND WHERE Make LIKE 'varMake'
    Dave
    "Don Pacino" <hspadwalhotmail.com> wrote in message
    news:d2kdne$qk8$1forums.macromedia.com...
    > hello,
    >
    > im using asp and dreamweavers automated features.
    >
    > the following query works
    >
    > select * from table where dateexp >= now
    >
    > so expired enteries do not display BUT when i add a second parameter
    >
    > select * from table where dateexp >= now AND Make = 'varMake'
    >
    > varmake is defined as request.QueryString("select1").
    >
    > im using the get method and submitting to the same page.
    >
    > why wont this work!!!!!!!
    >

    Baxter Guest

  3. #3

    Default Re: recordset query not working

    if varMake is a variable don't use quotes:

    varmake = request.QueryString("select1")

    select * from table where dateexp >= now AND Make = varMake


    Don Pacino wrote:
    > hello,
    >
    > im using asp and dreamweavers automated features.
    >
    > the following query works
    >
    > select * from table where dateexp >= now
    >
    > so expired enteries do not display BUT when i add a second parameter
    >
    > select * from table where dateexp >= now AND Make = 'varMake'
    >
    > varmake is defined as request.QueryString("select1").
    >
    > im using the get method and submitting to the same page.
    >
    > why wont this work!!!!!!!
    >
    Manuel Socarras Guest

  4. #4

    Default Re: recordset query not working

    Alright Dave,

    No i that doesnt seem to work, SQL wont let me put 2 WHERE clauses in the
    statement. here is my full shabang of a statement:

    SELECT *
    FROM tbl_sellcar
    WHERE advertiseFor >= now AND Make LIKE '%varMake%' AND askingPrice <=
    'varPrice' AND model = '%varModel%' AND Trim1 = '%varTrim%' AND mileage <=
    'varMile' AND County = 'varCoun' AND Yearmake >= 'varYear' AND Fuel1 =
    '%varFuel%'

    as you can see i am making a car search like autotraer. but dispite having a
    few entries in the database it just wont work.

    heres the link

    [url]http://www.onlinemanagementsystem.co.uk/reports_user/searchCar1.asp[/url]

    NOTES, the make box wont let you select alfa romeo, i need to chang that. the
    form is iusing a get method.

    Don Pacino Guest

  5. #5

    Default Re: recordset query not working

    Hi! Don
    Here a link to a tutorial that I think will help you out a bit more than
    trying to explain it all here. You need to look at this from a different
    perspective and I think this will help you get started in the right
    direction.
    If this don't work let me know and we'll proceed on .
    [url]http://www.webthang.co.uk/tuts/tuts_dmx/gk_search1/multisearch1.asp[/url]

    Dave
    "Don Pacino" <hspadwalhotmail.com> wrote in message
    news:d2mg1d$gkm$1forums.macromedia.com...
    > Alright Dave,
    >
    > No i that doesnt seem to work, SQL wont let me put 2 WHERE clauses in the
    > statement. here is my full shabang of a statement:
    >
    > SELECT *
    > FROM tbl_sellcar
    > WHERE advertiseFor >= now AND Make LIKE '%varMake%' AND askingPrice <=
    > 'varPrice' AND model = '%varModel%' AND Trim1 = '%varTrim%' AND mileage <=
    > 'varMile' AND County = 'varCoun' AND Yearmake >= 'varYear' AND Fuel1 =
    > '%varFuel%'
    >
    > as you can see i am making a car search like autotraer. but dispite
    having a
    > few entries in the database it just wont work.
    >
    > heres the link
    >
    > [url]http://www.onlinemanagementsystem.co.uk/reports_user/searchCar1.asp[/url]
    >
    > NOTES, the make box wont let you select alfa romeo, i need to chang that.
    the
    > form is iusing a get method.
    >

    Baxter Guest

  6. #6

    Default Re: recordset query not working

    easy dave!

    hope lifes treating you good. I found out what the problem was, i had to
    change the data type in my database to long interger and thats why my WHERE
    mileage <= varMileage query wasnt working on my ASP page, because it was
    thinking its a string and not a number.

    Take note people



    Don Pacino Guest

Similar Threads

  1. Problems with Recordset (Query) in Dreamweaver BindingsPanel
    By ChuckRWD in forum Coldfusion Database Access
    Replies: 2
    Last Post: November 24th, 05:53 PM
  2. ASP/SQL Query Recordset up to 200 characters?
    By Speegs in forum Dreamweaver AppDev
    Replies: 3
    Last Post: March 17th, 03:47 PM
  3. Getting 0 recordset in MS Access Query
    By jt in forum ASP Database
    Replies: 4
    Last Post: May 24th, 04:27 AM
  4. PHP & Simple Recordset Query
    By myvette webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 0
    Last Post: July 16th, 07:31 PM
  5. which the fastest way of working with recordset ?
    By Allen Browne in forum Microsoft Access
    Replies: 5
    Last Post: July 4th, 02:16 AM

Bookmarks

Posting Permissions

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

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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139