Ask a Question related to Coldfusion Database Access, Design and Development.
-
KGIRLCFDEVELOPER #1
SQL Nightmare
Everytime I try to add a record to my database, I get the following error:
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in
query expression ''January ,'', 'January', '', '', '','January'.
The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position (7:1) to (7:57).
Here is my code snippet: Can anyone help!?!
<cfset newPK = "#CreateUUID()#">
<cfset currentDate = "#Month(Now())#" & "/" & "#Day(Now())#" & "/" &
"#Year(Now())#">
<cfparam name="Form.appAddress2" default="">
<cfparam name="Form.appSchoolAddress2" default="">
<cfquery name="addApplication" datasource="stakeFriends">
INSERT INTO myApplications VALUES ('#newPK#', '#currentDate#', 'NO',
'#Form.appFName#', '#Form.appLName#', '#Form.appGender#', '#Form.appAge#',
'#Form.appDOBM#', '#Form.appDOBD#', '#Form.appDOBY#', '#Form.appIDTYPE#',
'#Form.appIDNUM#', '#Form.appHEIGHTF#', '#Form.appHEIGHTI#',
'#Form.appWEIGHT#', '#Form.appHAIR#', '#Form.appEYE#', '#Form.appEthnicity#',
'#Form.appEMAIL#', '#Form.appAddress1#', '#Form.appAddress2#',
'#Form.appCity#', '#Form.appZIP#', '#Form.appPhone#', '#Form.appCellPhone#',
'#Form.appCALLTIME#', '#Form.appParent#', '#Form.appLanguage#',
'#Form.appLanguageApt#', '#Form.appSCHOOLTYPE#', '#Form.appSchoolName#',
'#Form.appSchoolAddress1#', '#Form.appSchoolAddress2#', '#Form.appSchoolCity#',
'#Form.appSchoolZIP#', '#Form.appSchoolTime#', '#Form.appSchoolMiles#',
'#Form.appTOBACCOUSE#', '#Form.appTOBACCOPROGRAMS#', '#Form.appProgramName#',
'#Form.appProgramDescription#', '#Form.appTOBACCOPARTM#',
'#Form.appTOBACCOPARTY#', '#Form.appActivityName1#',
'#Form.appActivityPosition1#',
'#Form.appActivityMonthFrom1#', '#Form.appActivityYearFrom1#',
'#Form.appActivityMonthTo1#', '#Form.appActivityYearTo1#',
'#Form.appActivityName2#',
'#Form.appActivityPosition2#','#Form.appActivityMo nthFrom2#
,'#Form.appActivityYearFrom2#', '#Form.appActivityMonthTo2#',
'#Form.appActivityYearTo2#', '#Form.appActivityName3#',
'#Form.appActivityPosition3#','#Form.appActivityMo nthFrom3#
,'#Form.appActivityYearFrom3#', '#Form.appActivityMonthTo3#',
'#Form.appActivityYearTo3#')
</cfquery>
KGIRLCFDEVELOPER Guest
-
Nightmare SOLVED!!!
I have no idea how or why these registry permissions are a problem, but I do know that the following actions resolved the problems and allowed Flash... -
Is IE7 an end to the nightmare?
I've been considering installing Internet Explorer 7 in hopes that it might solve the Flash installation bug. Generally, I'm reluctant to go with... -
eps nightmare
hi, hope you all can help me. I'm having problems with exporting .eps from illu 10 on the pc. Basically Im placing images which are linked.... -
Printing still a nightmare...
Has anyone EVER been able to get sharp lines + beautiful vibrant color in AI 10/Mac OS 10.2.8? I have to print in AI 8 out of Mac OS 9 to get this,... -
apt-get nightmare
I'm trying to upgrade a laptop and I get the following error. Removing gnome-control-center dpkg: error processing gnome-control-center... -
Ken Ford - *TMM* & PVII #2
Re: SQL Nightmare
Missing a '
'#Form.appActivityMonthFrom2# ,
Should be:
'#Form.appActivityMonthFrom2#' ,
--
Ken Ford
PVII Support Team
[url]http://www.projectseven.com[/url]
Team Macromedia Volunteer - Dreamweaver
Certified Dreamweaver MX 2004 Developer
"KGIRLCFDEVELOPER" <webforumsuser@macromedia.com> wrote in message news:d11v1m$71t$1@forums.macromedia.com...> Everytime I try to add a record to my database, I get the following error:
>
> Error Diagnostic Information
>
> ODBC Error Code = 37000 (Syntax error or access violation)
>
> [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in
> query expression ''January ,'', 'January', '', '', '','January'.
>
> The error occurred while processing an element with a general identifier of
> (CFQUERY), occupying document position (7:1) to (7:57).
>
> Here is my code snippet: Can anyone help!?!
>
> <cfset newPK = "#CreateUUID()#">
> <cfset currentDate = "#Month(Now())#" & "/" & "#Day(Now())#" & "/" &
> "#Year(Now())#">
>
> <cfparam name="Form.appAddress2" default="">
> <cfparam name="Form.appSchoolAddress2" default="">
>
> <cfquery name="addApplication" datasource="stakeFriends">
> INSERT INTO myApplications VALUES ('#newPK#', '#currentDate#', 'NO',
> '#Form.appFName#', '#Form.appLName#', '#Form.appGender#', '#Form.appAge#',
> '#Form.appDOBM#', '#Form.appDOBD#', '#Form.appDOBY#', '#Form.appIDTYPE#',
> '#Form.appIDNUM#', '#Form.appHEIGHTF#', '#Form.appHEIGHTI#',
> '#Form.appWEIGHT#', '#Form.appHAIR#', '#Form.appEYE#', '#Form.appEthnicity#',
> '#Form.appEMAIL#', '#Form.appAddress1#', '#Form.appAddress2#',
> '#Form.appCity#', '#Form.appZIP#', '#Form.appPhone#', '#Form.appCellPhone#',
> '#Form.appCALLTIME#', '#Form.appParent#', '#Form.appLanguage#',
> '#Form.appLanguageApt#', '#Form.appSCHOOLTYPE#', '#Form.appSchoolName#',
> '#Form.appSchoolAddress1#', '#Form.appSchoolAddress2#', '#Form.appSchoolCity#',
> '#Form.appSchoolZIP#', '#Form.appSchoolTime#', '#Form.appSchoolMiles#',
> '#Form.appTOBACCOUSE#', '#Form.appTOBACCOPROGRAMS#', '#Form.appProgramName#',
> '#Form.appProgramDescription#', '#Form.appTOBACCOPARTM#',
> '#Form.appTOBACCOPARTY#', '#Form.appActivityName1#',
> '#Form.appActivityPosition1#',
> '#Form.appActivityMonthFrom1#', '#Form.appActivityYearFrom1#',
> '#Form.appActivityMonthTo1#', '#Form.appActivityYearTo1#',
> '#Form.appActivityName2#',
> '#Form.appActivityPosition2#','#Form.appActivityMo nthFrom2#
> ,'#Form.appActivityYearFrom2#', '#Form.appActivityMonthTo2#',
> '#Form.appActivityYearTo2#', '#Form.appActivityName3#',
> '#Form.appActivityPosition3#','#Form.appActivityMo nthFrom3#
> ,'#Form.appActivityYearFrom3#', '#Form.appActivityMonthTo3#',
> '#Form.appActivityYearTo3#')
> </cfquery>
>
Ken Ford - *TMM* & PVII Guest
-
Ken Ford - *TMM* & PVII #3
Re: SQL Nightmare
Missing one here too:
'#Form.appActivityMonthFrom3# ,
Should be:
'#Form.appActivityMonthFrom3#' ,
--
Ken Ford
PVII Support Team
[url]http://www.projectseven.com[/url]
Team Macromedia Volunteer - Dreamweaver
Certified Dreamweaver MX 2004 Developer
"Ken Ford - *TMM* & PVII" <kford@projectseven.com> wrote in message news:d11vll$7qj$1@forums.macromedia.com...> Missing a '
>
> '#Form.appActivityMonthFrom2# ,
>
> Should be:
>
> '#Form.appActivityMonthFrom2#' ,
>
>
> --
> Ken Ford
> PVII Support Team
> [url]http://www.projectseven.com[/url]
> Team Macromedia Volunteer - Dreamweaver
> Certified Dreamweaver MX 2004 Developer
>
>
> "KGIRLCFDEVELOPER" <webforumsuser@macromedia.com> wrote in message news:d11v1m$71t$1@forums.macromedia.com...>>> Everytime I try to add a record to my database, I get the following error:
>>
>> Error Diagnostic Information
>>
>> ODBC Error Code = 37000 (Syntax error or access violation)
>>
>> [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in
>> query expression ''January ,'', 'January', '', '', '','January'.
>>
>> The error occurred while processing an element with a general identifier of
>> (CFQUERY), occupying document position (7:1) to (7:57).
>>
>> Here is my code snippet: Can anyone help!?!
>>
>> <cfset newPK = "#CreateUUID()#">
>> <cfset currentDate = "#Month(Now())#" & "/" & "#Day(Now())#" & "/" &
>> "#Year(Now())#">
>>
>> <cfparam name="Form.appAddress2" default="">
>> <cfparam name="Form.appSchoolAddress2" default="">
>>
>> <cfquery name="addApplication" datasource="stakeFriends">
>> INSERT INTO myApplications VALUES ('#newPK#', '#currentDate#', 'NO',
>> '#Form.appFName#', '#Form.appLName#', '#Form.appGender#', '#Form.appAge#',
>> '#Form.appDOBM#', '#Form.appDOBD#', '#Form.appDOBY#', '#Form.appIDTYPE#',
>> '#Form.appIDNUM#', '#Form.appHEIGHTF#', '#Form.appHEIGHTI#',
>> '#Form.appWEIGHT#', '#Form.appHAIR#', '#Form.appEYE#', '#Form.appEthnicity#',
>> '#Form.appEMAIL#', '#Form.appAddress1#', '#Form.appAddress2#',
>> '#Form.appCity#', '#Form.appZIP#', '#Form.appPhone#', '#Form.appCellPhone#',
>> '#Form.appCALLTIME#', '#Form.appParent#', '#Form.appLanguage#',
>> '#Form.appLanguageApt#', '#Form.appSCHOOLTYPE#', '#Form.appSchoolName#',
>> '#Form.appSchoolAddress1#', '#Form.appSchoolAddress2#', '#Form.appSchoolCity#',
>> '#Form.appSchoolZIP#', '#Form.appSchoolTime#', '#Form.appSchoolMiles#',
>> '#Form.appTOBACCOUSE#', '#Form.appTOBACCOPROGRAMS#', '#Form.appProgramName#',
>> '#Form.appProgramDescription#', '#Form.appTOBACCOPARTM#',
>> '#Form.appTOBACCOPARTY#', '#Form.appActivityName1#',
>> '#Form.appActivityPosition1#',
>> '#Form.appActivityMonthFrom1#', '#Form.appActivityYearFrom1#',
>> '#Form.appActivityMonthTo1#', '#Form.appActivityYearTo1#',
>> '#Form.appActivityName2#',
>> '#Form.appActivityPosition2#','#Form.appActivityMo nthFrom2#
>> ,'#Form.appActivityYearFrom2#', '#Form.appActivityMonthTo2#',
>> '#Form.appActivityYearTo2#', '#Form.appActivityName3#',
>> '#Form.appActivityPosition3#','#Form.appActivityMo nthFrom3#
>> ,'#Form.appActivityYearFrom3#', '#Form.appActivityMonthTo3#',
>> '#Form.appActivityYearTo3#')
>> </cfquery>
>>
>
Ken Ford - *TMM* & PVII Guest
-
Der Nickname #4
Re: SQL Nightmare
I miss the the table cols where You want to enter these Values.
A SQL Syntax like this must be e.g.:
Insert into MyApplications (1,3,4,) Values ('1','2','3');
or
insert into MyApplications set 1='1', 2='2', 3='3';
SQL isn't a real good friend if you now to handle it ;)
Der Nickname Guest
-
Dorian_Laird #5
Re: SQL Nightmare
Originally posted by: Der Nickname I miss the the table cols where You want to
enter these Values. A SQL Syntax like this must be e.g.: Insert into
MyApplications (1,3,4,) Values ('1','2','3'); or insert into MyApplications set
1='1', 2='2', 3='3'; If you specify the VALUES in the same order like the
cols of your table, you can use the shorter Syntax: INSERT INTO tablename
VALUES ('first-field','second-field') - so the Treatstarters Syntax is ok. :-)
cu
Dorian_Laird Guest
-
Der Nickname #6
Re: SQL Nightmare
If so, It also should work. ;)
I just tell you how I learned it and in that way I never got any problems with SQL.
Der Nickname Guest



Reply With Quote

