Solved

update db occur error code 37000

Posted on 2001-06-28
4
268 Views
Last Modified: 2013-12-24
hai,
i am using Access 97 with .mdb file called general
inside has a table called "event", with 2 datatype:
  name        format
event_name text
event_date date/time(Medium time eg. 19-Jun-94)

it doesnot show any problem when i add new record to it, but
when i update the record using query:


<CFSET eventdate = CreateDate(Form.date3, Form.date2, Form.date1)>
<CFSET event_date = DateFormat(eventdate,"dd-mmm-yyyy")>

<cfquery name="updateevent" datasource="general">
UPDATE event
     SET event_name  = '#Form.event_name#',
                event_date   = '#event_date#',
WHERE event_name = '#form.name#'
</cfquery>

it shows error message at the UPDATE query which is:
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access 97 Driver] Syntax error in UPDATE statement.

why this happen?
0
Comment
Question by:J_J
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Accepted Solution

by:
JYnet earned 20 total points
ID: 6236919
i think only small problem...

REMEMBER NO "," AT THE LAST COMMAND OF UPDATE

:)
0
 
LVL 5

Expert Comment

by:Yog
ID: 6237053
<cfquery name="updateevent" datasource="general">
UPDATE event
SET event_name  = '#Form.event_name#',
    event_date   = '#createodbcdate(event_date)#',
WHERE event_name = '#form.name#'
</cfquery>

use createodbedate - also in the where clause use primary key
example
WHERE event_id = 1



0
 
LVL 5

Expert Comment

by:Yog
ID: 6237054
and forgpt no "'" in date
<cfquery name="updateevent" datasource="general">
UPDATE event
SET event_name  = '#Form.event_name#',
    event_date   = #createodbcdate(event_date)#,
WHERE event_id = '1'
</cfquery>


0
 

Author Comment

by:J_J
ID: 6244207
thanks, JYnet. how silly i am!
0

Featured Post

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question