Solved

query syntax error:(

Posted on 2007-11-17
1
566 Views
Last Modified: 2008-02-01
in all my codes i inserted in all time fields DATE_ADD(LOCALTIME(),INTERVAL 420 minute)

now when i got to the updating...i got an error
mySQLup="UPDATE crmpacks SET update=DATE_ADD(LOCALTIME(),INTERVAL 420 minute), topic='" &pntopic& "', info='" &pninfo& "', price='" &pnprice& "', agentprice='" &pnagentprice& "' WHERE id=" &pupdp




Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 
 
[MySQL][ODBC 3.51 Driver][mysqld-4.1.21-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update=DATE_ADD(LOCALTIME(),INTERVAL 420 minute), topic='11gd', info='222fdf', p' at line
 
can i do this in one update and not update+insert

Open in new window

0
Comment
Question by:sasha85
[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
1 Comment
 
LVL 20

Accepted Solution

by:
steelseth12 earned 500 total points
ID: 20306102
update is a reserved word .... try putting in it in backticks

mySQLup="UPDATE crmpacks SET `update`=DATE_ADD(LOCALTIME(),INTERVAL 420 minute), topic='" &pntopic& "', info='" &pninfo& "', price='" &pnprice& "', agentprice='" &pnagentprice& "' WHERE id=" &pupdp
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

734 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