You probably just need a comma after '#phone#' and lose the comma after
emailaddress in your first INSERT query. I'm not positive but I think
you need to name your query too. These kinds of pesky little problems
are much easier to spot if you write your queries like so:
<CFQUERY NAME="InsertIntoMemberList" DATASOURCE="vhc">
INSERT INTO memberlist
(
firstname,
lastname,
boat,
boatyear,
address,
city,
phone,
state,
zip,
emailaddress
)
VALUES
(
'#firstname#',
'#lastname#',
'#boat#',
#boatyear#,
'#address#',
'#city#',
'#phone#',
'#state#',
#zip#,
#emailaddress#'
)
</CFQUERY>
Original message:
===========
Date: Thu, 6 Jul 2000 09:18:20 -0600
From: "gregg Kachel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: still not working
Message-ID: <003801bfe75d$6b1e8400$[EMAIL PROTECTED]>
Hi, thanks for all of your help. I'm still struggling with the
connecting
the two tables. I did as Mark suggested and checked for required fields,
the
only one I have is the primary keys wich are autonumbered (memberid for
memberlist, id for members) I linked the tables together with memberID
but
that doesn't seem to help. Also as Nick suggested I took out the ''s
from
my number fields, and put the inserts in correct order. So far this is
what
i have:
<cfquery
Datasource="vhc">
insert into memberlist(firstname,lastname, boat, boatyear, address,
city,
phone, state, zip, emailaddress, )
values( '#firstname#', '#lastname#', '#boat#', #boatyear#, '#address#',
'#city#', '#phone#' '#state#',#zip#, #emailaddress#')
</cfquery>
<cfquery
Datasource="vhc">
insert into members(firstname,lastname, username, password,
emailaddress)
values( '#firstname#', '#lastname#', '#username#', '#password#',
'#emailaddress#')
</cfquery>
The error is:
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
statement.
The error occurred while processing an element with a general identifier
of
(CFQUERY), occupying document position (2:1) to (3:17).
Date/Time: 07/06/00 09:26:49
Browser: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Remote Address: 192.168.0.55
HTTP Referer:
http://www.houseboatmagazine.com/admin/vhc/newaddprofile.cfm
Template: D:\Inetpub\wwwroot\CFDOCS\a
Web\houseboat\admin\vhc\newaddprofile2.cfm
Thanks again, I'm getting very frustrating, I know this should be fairly
easy and straight forward.
Gregg
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.