Welcome to Dream.In.Code
Getting Help is Easy!

Join 109,295 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,217 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



VENDORERRORCODE 3092

 
Reply to this topicStart new topic

VENDORERRORCODE 3092

coldiron
post 28 Mar, 2007 - 09:08 AM
Post #1


New D.I.C Head

*
Joined: 28 Mar, 2007
Posts: 3


My Contributions


Hi,

I am using Coldfusion 7 on MS Vista w/Dreamweaver 8 using MSAccess 2007 saving my database as MSACCESS 2003.

When I use the insert record wizzard in Dreamweaver, I get the following error message on half of my tables in my database.

I suspect my syntax is wrong, but I cant figure out how to edit it. I have created test tables (like the one I am describing here) with only a few fields and no relationships. I have read lots of strings on this topic, so that is why I simply created test tables with all text fields except the primary key and a potential relation field.

I think one of my troubleshooting problems is that I dont know how to enter my sql statement into the Access query builder regarding the value of my (param) statements. But I can enter data fine from within Access, either directly into the tables or from a custom query.

What should I try next?

CODE

<cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "form1">
  <cfquery datasource="#Request.DSN#">
    INSERT INTO customers (usertypeid, username, password)
    VALUES (
  <cfif IsDefined("FORM.usertypeid") AND #FORM.usertypeid# NEQ "">
    <cfqueryparam value="#FORM.usertypeid#" cfsqltype="cf_sql_numeric">
    <cfelse>
    NULL
  </cfif>
    ,
  <cfif IsDefined("FORM.username") AND #FORM.username# NEQ "">
    <cfqueryparam value="#FORM.username#" cfsqltype="cf_sql_clob" maxlength="255">
    <cfelse>
    ''
  </cfif>
    ,
  <cfif IsDefined("FORM.password") AND #FORM.password# NEQ "">
    <cfqueryparam value="#FORM.password#" cfsqltype="cf_sql_clob" maxlength="255">
    <cfelse>
    ''
  </cfif>
    )
  </cfquery>
  <cflocation url="/admin/adminindex.cfm">
</cfif>


==================================================
Error Executing Database Query.
Syntax error in INSERT INTO statement.

The error occurred in C:\CFusionMX7\wwwroot\admin\users\adduser.cfm: line 22

20 : <cfelse>
21 : ''
22 : </cfif>
23 : )
24 : </cfquery>



--------------------------------------------------------------------------------

SQL INSERT INTO customers (usertypeid, username, password) VALUES ( (param 1) , (param 2) , (param 3) )
DATASOURCE DaytonFSBO
VENDORERRORCODE 3092
SQLSTATE &nbsp;

Please try the following:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.


Browser Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; InfoPath.2)
Remote Address 127.0.0.1
Referrer http://localhost:8500/admin/users/adduser.cfm
Date/Time 28-Mar-07 03:32 PM

Stack Trace (click to expand)
==========================================================
User is offlineProfile CardPM

Go to the top of the page


ajwsurfer
post 10 Apr, 2007 - 11:51 AM
Post #2


D.I.C Regular

Group Icon
Joined: 24 Oct, 2006
Posts: 274



Thanked 2 times

Dream Kudos: 50
My Contributions


Well, out of all the cfqueries I have in my application, every one of them has a name. This one does not have a name, however.
User is offlineProfile CardPM

Go to the top of the page

spinner
post 6 Aug, 2008 - 10:48 PM
Post #3


New D.I.C Head

*
Joined: 6 Aug, 2008
Posts: 2

I'm having exactly this same error pop up. And, it's not consistant. I've compared the code between pages where the insert is working just fine and those that give this error and there doesn't seem to be a problem with the code. I've even written the values into a SQL query string that runs perfectly in the database but even with a perfectly acceptable query string handcoded into the <cfquery> the page can't execute the insert query. If anyone else has experienced this and can provide some direction it would be greatly appreciated!

This is what I'm stuck on:
+++++++++++++++++++++++
Error Occurred While Processing Request
Error Executing Database Query.
Syntax error in INSERT INTO statement.

The error occurred in C:\CFusionMX7\wwwroot\blastfree\DRR_CreateLogin.cfm: line 49

47 : <cfelse>
48 : ''
49 : </cfif>
50 : )
51 : </cfquery>



--------------------------------------------------------------------------------

SQL INSERT INTO tblPasswordInfo (FirstName, UserName, Password, UserGroup, ContactID, RemQuestion, RemAnswer) VALUES ( (param 1) , (param 2) , (param 3) , (param 4) , (param 5) , (param 6) , (param 7) )
DATASOURCE access_BlastFree
VENDORERRORCODE 3092
SQLSTATE  

Please try the following:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.


Browser Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2; NET_mmhpset)
Remote Address 127.0.0.1
Referrer http://localhost:8500/blastfree/DRR_CreateLogin.cfm
Date/Time 07-Aug-08 05:40 AM


User is offlineProfile CardPM

Go to the top of the page

sansclue
post 7 Aug, 2008 - 07:01 AM
Post #4


D.I.C Head

**
Joined: 21 Nov, 2007
Posts: 82



Thanked 4 times
My Contributions


QUOTE(spinner @ 6 Aug, 2008 - 10:48 PM) *

I've even written the values into a SQL query string that runs perfectly in the database but even with a perfectly acceptable query string handcoded into the <cfquery> the page can't execute the insert query.


That's a good test.

I suspect you are using a reserved word as table or column name. That would cause a syntax error because the database is not treating it as an object name. My first guess would be the "Password" column. Try adding [ ] around it in your query.

CODE

INSERT INTO YourTable (  [Password], OtherColumns, ..... )


If that fixes the syntax error, rename the column. If it is not possible to rename it, you will need to add [] to every query containing the "password" column.
User is offlineProfile CardPM

Go to the top of the page

spinner
post 7 Aug, 2008 - 04:14 PM
Post #5


New D.I.C Head

*
Joined: 6 Aug, 2008
Posts: 2

Hi sansclue!
I actually stayed up all night and found that Password was a reserved word. I logged back in to post the solution. It's so simple and I saw how many folks looked at this thread. It's important to share even the easy answers and save others a bit of a headache. Thanks very much for posting!

spinner

QUOTE(sansclue @ 7 Aug, 2008 - 07:01 AM) *

QUOTE(spinner @ 6 Aug, 2008 - 10:48 PM) *

I've even written the values into a SQL query string that runs perfectly in the database but even with a perfectly acceptable query string handcoded into the <cfquery> the page can't execute the insert query.


That's a good test.

I suspect you are using a reserved word as table or column name. That would cause a syntax error because the database is not treating it as an object name. My first guess would be the "Password" column. Try adding [ ] around it in your query.

CODE

INSERT INTO YourTable (  [Password], OtherColumns, ..... )


If that fixes the syntax error, rename the column. If it is not possible to rename it, you will need to add [] to every query containing the "password" column.

User is offlineProfile CardPM

Go to the top of the page

sansclue
post 7 Aug, 2008 - 06:04 PM
Post #6


D.I.C Head

**
Joined: 21 Nov, 2007
Posts: 82



Thanked 4 times
My Contributions


QUOTE(spinner @ 7 Aug, 2008 - 04:14 PM) *

It's important to share even the easy answers and save others a bit of a headache.


Absolutely! I am glad everything is working now spinner.


User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 9/6/08 09:31AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month