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 http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! 5 1594
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" <jo*****@canada.com> wrote in message
news:Ou**************@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 http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
> 'articleid' is a primary key.
So how are you populating this? Where does articleid get generated?
is sport a number field?
is articleid an Identity field?
"J. Muenchbourg" <jo*****@canada.com> wrote in message
news:Ou**************@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 http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
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 http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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" <jo*****@canada.com> wrote in message
news:Om**************@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 http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: ray sleeper |
last post by:
This is the syntax i'm using: python setup.py p2exe
i get "invalid synyax " message. According to the Py2exe website this the correct syntax.
using python 2.2 on WinXP box with...
|
by: Bradley Kite |
last post by:
Hi all.
I'm trying to diagnose/solve a problem with internet explorer, whereby
sometimes the form submits, and other times IE produces an 'invalid
syntax' error.
First, I have a form, and...
|
by: deko |
last post by:
I'm getting intermittent "Object Invalid or No Longer Set" errors in my
Access 2002 mdb.
What causes these errors?
Has anyone dealt with this before?
I can't trace it because it's not easy...
|
by: Mark Phanides |
last post by:
My ASP.NET application intermittantly (but always at same point) redirects to the 'Invalid Syntax Error' web page for some unknown reason.
I've created a ASP.NET application written in VB.NET with...
|
by: DIBS |
last post by:
I'm new to Python and I don't understand what I'm doing wrong.
I'm running windows xp.
In the command line window, I type:
Python Sudoku.py
and I get the response"
SyntaxError: invalid...
|
by: py |
last post by:
Hi,
I am running python 2.4.2 on win xp pro. I have the WMI module from
Tim Golden (http://tgolden.sc.sabren.com/python/wmi.html).
I have some code which does this...
MyScript.py...
|
by: chrisstankevitz |
last post by:
Hi,
Q1: Is there a way to make a template function that works only for
specific types which produces a compiler error if used with an invalid
type?
Q2: If not, how do people deal with this...
|
by: ronrsr |
last post by:
no matter where I place this imported file,the statement after it in
the main program gets a syntax error, regardless of the syntax.
I think I may have changed something in this file, but I'm...
|
by: alf |
last post by:
Hi,
I wonder why it is an invalid syntax:
File "<stdin>", line 1
if 1: if 1: if 1: print 1
or
|
by: Nathan Pinno |
last post by:
Why does my compiler say invalid syntax and then highlight the
quotation marks in the following code:
# This program is to find primes.
primes =
import math
import gmpy
while 1:
run =...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |