Solved

update db occur error code 37000

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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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