?
Solved

update db occur error code 37000

Posted on 2001-06-28
4
Medium Priority
?
272 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 60 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
What You Need to Know when Searching for a Webhost Provider
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

719 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