Ask a Question related to ASP, Design and Development.
-
J. Muenchbourg #1
INvalid syntax
an Incorrect syntax near ','. (Line 1) is what I'm getting with this
insert statement, the error pointing to the sql execute:
"INSERT INTO
tblArticles(articleid,articleDate,sport,articlehea der,fpick,articleText)
"_
& "VALUES (" & articleid & ", '" _
& articledate & "', " _
& sport & ", '" _
& articleheader & "', '" _
& fpick & "', '" _
& articleText & "')"
'articleid' is a primary key.
???
Muench
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
J. Muenchbourg Guest
-
syntax Error: invalid quantifier
syntax Error: invalid quantifier -
If than syntax help please
I'm trying to say: If price2 equals the selected price than apply the style bold price. If price 2 is nothing or zero than show nothing. If price... -
Need Help With Syntax!
> <td bgcolor="#FFFFFF" width="10"> Why do you need the double quotes to appear??? Double-quotes around attribute values are useless, imho,... -
Syntax
Hi, In a subclass, is sub new() end sub the same as sub new() -
Help with DB2 Syntax.
Hi Everyone, Recently our comany upgraded their applications from MS ACCESS 2000 to DB2 version 7.2 UDB. I'm not as skilled in DB2 with the... -
Ray at #2
Re: INvalid syntax
s = "INSERT INTO
tblArticles(articleid,articleDate,sport,articlehea der,fpick,articleText)
"_
& "VALUES (" & articleid & ", '" _
& articledate & "', " _
& sport & ", '" _
& articleheader & "', '" _
& fpick & "', '" _
& articleText & "')"
RESPONSE.WRITE S
RESPONSE.END
What does that produce?
Ray at work
"J. Muenchbourg" <jodaddy@canada.com> wrote in message
news:OuKs65sfDHA.2364@TK2MSFTNGP09.phx.gbl...> an Incorrect syntax near ','. (Line 1) is what I'm getting with this
> insert statement, the error pointing to the sql execute:
>
> "INSERT INTO
> tblArticles(articleid,articleDate,sport,articlehea der,fpick,articleText)
> "_
> & "VALUES (" & articleid & ", '" _
> & articledate & "', " _
> & sport & ", '" _
> & articleheader & "', '" _
> & fpick & "', '" _
> & articleText & "')"
>
> 'articleid' is a primary key.
>
> ???
> Muench
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Ray at Guest
-
Aaron Bertrand - MVP #3
Re: INvalid syntax
> 'articleid' is a primary key.
So how are you populating this? Where does articleid get generated?
Aaron Bertrand - MVP Guest
-
Tom B #4
Re: INvalid syntax
is sport a number field?
is articleid an Identity field?
"J. Muenchbourg" <jodaddy@canada.com> wrote in message
news:OuKs65sfDHA.2364@TK2MSFTNGP09.phx.gbl...> an Incorrect syntax near ','. (Line 1) is what I'm getting with this
> insert statement, the error pointing to the sql execute:
>
> "INSERT INTO
> tblArticles(articleid,articleDate,sport,articlehea der,fpick,articleText)
> "_
> & "VALUES (" & articleid & ", '" _
> & articledate & "', " _
> & sport & ", '" _
> & articleheader & "', '" _
> & fpick & "', '" _
> & articleText & "')"
>
> 'articleid' is a primary key.
>
> ???
> Muench
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Tom B Guest
-
J. Muenchbourg #5
Re: INvalid syntax
dim sqlid
sqlid = "SELECT max articleid from tblarticles"
Set rsid = Server.CreateObject("ADODB.Recordset")
rsid.Open sqlid,sqlc,3
articleid = rsid("articleid")
rsid.Close
set rsid = nothing
in response to Tom's question about 'sport', yes it is an integer
datatype
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
J. Muenchbourg Guest
-
Tom B #6
Re: INvalid syntax
Aaron asked how you CREATED the articleid, is it an Identity(SQL Server) or
Autonumber(Access)
if it is, then you can't insert a value, which you are doing in your insert
statement.
If it's not an Identity/Autonumber, are you ensuring it's unique? You said
it was a Primary Key, so it has to be unique.
"J. Muenchbourg" <jodaddy@canada.com> wrote in message
news:OmBIA3tfDHA.1872@TK2MSFTNGP09.phx.gbl...>
>
> dim sqlid
> sqlid = "SELECT max articleid from tblarticles"
> Set rsid = Server.CreateObject("ADODB.Recordset")
> rsid.Open sqlid,sqlc,3
>
> articleid = rsid("articleid")
> rsid.Close
> set rsid = nothing
>
>
> in response to Tom's question about 'sport', yes it is an integer
> datatype
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Tom B Guest



Reply With Quote

