[thelist] database query question

NanHarbisonSmith at aol.com NanHarbisonSmith at aol.com
Sat May 25 16:18:00 CDT 2002


--
[ Picked text/plain from multipart/alternative ]
Hi Jeremy,
If you copied/pasted your code into this email exactly the way you are
running it, then it looks like you forgot to put the single quotation marks
around the last zipcode, but then I don't know what that last zipcode word
is, is it a variable?
Assuming the last time you have the word zipcode it is a variable, then it
should say:
WHERE zipcode= 'zipcode'  then add the last double quote, which I left out
because it would be hard to see it here.
But then maybe this is not the problem, since the query works if you take out
email and URL. Have you been careful about case sensitivity? I am nor sure
about the database you are using (Access?), but other DBs are case sensitive,
so if the table column is EMAIL and you are referencing it as email, it may
not work.
These are some of the mistakes I made when I was first learning SQL.
Nan


--------------original message----------------

> Unfortunately, I've run into a problem writing the query that I'm needing.
> What I need is to search a field (zipcode) in a table (main_tbl) and see if
> the user inputted a valid zipcode.  If so, I need information pulled from
> several fields in that record (url & email for starters).
> Here's what I've got so far for this query.
> SQL = "SELECT zipcode, email, url FROM Main_tbl WHERE zipcode= zipcode"
> It looks okay to me, but I get the following error message.
> --
> Microsoft JET Database Engine error '80040e10'
>
> No value given for one or more required parameters.
> --
>
> Now if I take out the email, url  and leave just the zipcode it works... but
> I'm not sure why.
>




More information about the thelist mailing list