As it has been the case before, I can't see the problem with this command.
All fields are text fields. Using MS ACCESS ...
THE CODE:
---------------------------------------------------
<cfelseif url.method is "Add">
<cfquery name="dupDist" datasource="#application.dsn#" dbtype="odbc">
select *
from wpDist
where DstCode = '#form.DstCode#'
</cfquery>
<cfif dupDist.recordcount is "0">
<cfquery datasource="#application.dsn#" dbtype="odbc">
insert into wpDist(DstCode, DstName, DstAcct, DstPhone, DstExt, DstContact, DstPhone2 DstPhone3, DstComments)
values('#form.Dstcode#', '#form.DstName#', '#form.DstAcct#', '#form.DstPhone#', '#form.DstExt#', '#form.DstContact#', '#form.DstPhone2#', '#form.DstPhone3#', '#form.Dstcomments#')
</cfquery>
</cfif>
THE ERROR:
------------------------------------------------------
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
SQL = "insert into wpDist(DstCode, DstName, DstAcct, DstPhone, DstExt, DstContact, DstPhone2 DstPhone3, DstComments) values('josel', 'Jose Lerebours', 'Your-Acct-ID', '954-431-2468', '78901', 'Jose D. Lerebours', '', '', 'These are the comments I entered int the text ara provided to enter at least three lines of comments')"
Data Source = "DECO"
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (26:4) to (26:57).
------------------------------------------------------ If you have the knowledge, consult and educate those who need it! - Jose Lerebours
All fields are text fields. Using MS ACCESS ...
THE CODE:
---------------------------------------------------
<cfelseif url.method is "Add">
<cfquery name="dupDist" datasource="#application.dsn#" dbtype="odbc">
select *
from wpDist
where DstCode = '#form.DstCode#'
</cfquery>
<cfif dupDist.recordcount is "0">
<cfquery datasource="#application.dsn#" dbtype="odbc">
insert into wpDist(DstCode, DstName, DstAcct, DstPhone, DstExt, DstContact, DstPhone2 DstPhone3, DstComments)
values('#form.Dstcode#', '#form.DstName#', '#form.DstAcct#', '#form.DstPhone#', '#form.DstExt#', '#form.DstContact#', '#form.DstPhone2#', '#form.DstPhone3#', '#form.Dstcomments#')
</cfquery>
</cfif>
THE ERROR:
------------------------------------------------------
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
SQL = "insert into wpDist(DstCode, DstName, DstAcct, DstPhone, DstExt, DstContact, DstPhone2 DstPhone3, DstComments) values('josel', 'Jose Lerebours', 'Your-Acct-ID', '954-431-2468', '78901', 'Jose D. Lerebours', '', '', 'These are the comments I entered int the text ara provided to enter at least three lines of comments')"
Data Source = "DECO"
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (26:4) to (26:57).
------------------------------------------------------ If you have the knowledge, consult and educate those who need it! - Jose Lerebours