Solved

update db occur error code 37000

Posted on 2001-06-28
4
262 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
  • 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now