[thelist] ASP using SQL but anoing me like $%&#

Elfur Logadottir elfur at lists.evolt.org
Sun Jan 28 17:48:40 CST 2001


oh, if only rudy were here ...

From: "Jed Farr" <farr at dial.pipex.com>


| Hi Elfur,
|
|    Does that sql work in Query Analyser/Access/your db
query tool ?

You are on to something here - actually no it doesn't.
obviously not, since when I looked up my bullshit syntax, I
noticed how wrong it was.

instead of this:

strsql = "insert into vinstri
    (name) values ('"& Request.form("nafn") &"')"
 & "(url) values ('"& Request.form("url") &"')"
 & "(menu) values ('"& Request.form("menu") &"')"
 & "(order) values ('"& Request.form("order") &"')"

it's supposed to look like (almost) this:

strsql = "insert into vinstri
    (name, url, menu, order)
     values ('"& strName & "' ,'" & strUrl & "' ,'" &
strMenu & "' ,'" & strOrder & "')"

your supposed to name first all the columns and then all the
values.

But that still throws an error, and when using access,
creating a query containing only the SQL statement, it stops
on the 'order' part in the first parenthesis, claiming
'syntax error'

when I leave out the fourth column (order; '1'), access
agrees and accepts the addition <sigh>
So now I'm closer to the truth, but still having problems.

rudy where art thou??

elfur
*the one?






More information about the thelist mailing list