The Code:
<!--- Debugging Stuff --->
<cfparam name="MethodFound" default="No">
<cfparam name="SessionUser" default="No">
<cfparam name="URLID" default="No">
<cfif isdefined("url.Method"
>
<cfset MethodFound="Yes">
<cfif isdefined("session.UserName"
>
<cfset SessionUser="Yes">
<cfif isdefined("URL.ID"
>
<cfset URLID="Yes">
<cfset Share="N">
<cfset MailList="N">
<cfif isdefined("form.MailList"
>
<cfset MailList="Y">
</cfif>
<cfif isdefined("form.Share"
>
<cfset Share="Y">
</cfif>
<cfquery name="updtUser" datasource="deco" dbtype="odbc">
update sysAccounts
set UserCode='#form.email#',
MailList='#MailList#',
Share='#Share#',
Company='#form.Company#',
FirstName='#form.FirstName#',
LastName='#form.LastName#',
Address1='#form.Address1#',
Address2='#form.Address2#',
City='#form.City#',
State='#form.State#',
ZipCode='#form.ZipCode#',
HomePhone='#form.HomePhone#',
WorkPhone='#form.WorkPhone#',
CellPhone='#form.CellPhone#',
FaxPhone='#form.FaxPhone#',
LastUpdated='#dateformat(now(), "DDD, MMM D, YYYY"
#',
where UserID=#session.UserID#
</cfquery>
<cfquery name="updtID" datasource="deco" dbtype="odbc">
update sysUserID
set UserCode='#form.email#',
UserPswd='#form.password1#',
where UserID=#session.UserID#
</cfquery>
</cfif>
</cfif>
</cfif>
<cfoutput>
<!--- Debugging stuff ... --->
MethodFound: #MethodFound#<br>
SessionUser: #SessionUser#<br>
URLID......: #URLID#<br>
<p>
<a href="myProfile.cfm?ID=#session.UserID#">Continue!</a>
</cfoutput>
----------------------------------------------------------------------------
The error:
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
SQL = "update sysAccounts set UserCode='demo@decodemo.com', MailList='N', Share='Y', Company='My Company', FirstName='Jose', LastName='Lerebours', Address1='951 NW 185th Terrace', Address2='', City='Pembroke PInes', State='FL', ZipCode='33029', HomePhone='954-431-2468', WorkPhone='', CellPhone='', FaxPhone='954-538-9815', LastUpdated=Wed, Feb 6, 2002, where UserID=20"
Data Source = "DECO"
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (29:3) to (29:43).
-------------------------------------------------------------------------------------------
Every field in table is defined as text and they allow zero length ... I am using MS Access CF 5.0. I have read many other posts in this forum with same error but none of the suggestions seem to cure my problem. All fields in form are also text fields.
I have tried dateformat(now(), ...) with and without quotes and NADA ...
Thank you all for you help;
josel If you have the knowledge, consult and educate those who need it! - Jose Lerebours
<!--- Debugging Stuff --->
<cfparam name="MethodFound" default="No">
<cfparam name="SessionUser" default="No">
<cfparam name="URLID" default="No">
<cfif isdefined("url.Method"
<cfset MethodFound="Yes">
<cfif isdefined("session.UserName"
<cfset SessionUser="Yes">
<cfif isdefined("URL.ID"
<cfset URLID="Yes">
<cfset Share="N">
<cfset MailList="N">
<cfif isdefined("form.MailList"
<cfset MailList="Y">
</cfif>
<cfif isdefined("form.Share"
<cfset Share="Y">
</cfif>
<cfquery name="updtUser" datasource="deco" dbtype="odbc">
update sysAccounts
set UserCode='#form.email#',
MailList='#MailList#',
Share='#Share#',
Company='#form.Company#',
FirstName='#form.FirstName#',
LastName='#form.LastName#',
Address1='#form.Address1#',
Address2='#form.Address2#',
City='#form.City#',
State='#form.State#',
ZipCode='#form.ZipCode#',
HomePhone='#form.HomePhone#',
WorkPhone='#form.WorkPhone#',
CellPhone='#form.CellPhone#',
FaxPhone='#form.FaxPhone#',
LastUpdated='#dateformat(now(), "DDD, MMM D, YYYY"
where UserID=#session.UserID#
</cfquery>
<cfquery name="updtID" datasource="deco" dbtype="odbc">
update sysUserID
set UserCode='#form.email#',
UserPswd='#form.password1#',
where UserID=#session.UserID#
</cfquery>
</cfif>
</cfif>
</cfif>
<cfoutput>
<!--- Debugging stuff ... --->
MethodFound: #MethodFound#<br>
SessionUser: #SessionUser#<br>
URLID......: #URLID#<br>
<p>
<a href="myProfile.cfm?ID=#session.UserID#">Continue!</a>
</cfoutput>
----------------------------------------------------------------------------
The error:
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
SQL = "update sysAccounts set UserCode='demo@decodemo.com', MailList='N', Share='Y', Company='My Company', FirstName='Jose', LastName='Lerebours', Address1='951 NW 185th Terrace', Address2='', City='Pembroke PInes', State='FL', ZipCode='33029', HomePhone='954-431-2468', WorkPhone='', CellPhone='', FaxPhone='954-538-9815', LastUpdated=Wed, Feb 6, 2002, where UserID=20"
Data Source = "DECO"
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (29:3) to (29:43).
-------------------------------------------------------------------------------------------
Every field in table is defined as text and they allow zero length ... I am using MS Access CF 5.0. I have read many other posts in this forum with same error but none of the suggestions seem to cure my problem. All fields in form are also text fields.
I have tried dateformat(now(), ...) with and without quotes and NADA ...
Thank you all for you help;
josel If you have the knowledge, consult and educate those who need it! - Jose Lerebours