?
Solved

can't update enum field in MySQL

Posted on 2003-03-06
11
Medium Priority
?
621 Views
Last Modified: 2007-12-19
I've have this code where I use read as a boolean field it's just a enum field with a value of ('0','1').

Set rs = objConn.execute("UPDATE pm SET read = 0 (Where id = "&strid&") ")

But it won't update I get this error

Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[TCX][MyODBC]You have an error in your SQL syntax near 'read = 0 (Where id = 1) ' at line 1

I'm rather new to mysql and is mostly used to Access so I might be doing something basic wrong.


Cheers
bjawnie
0
Comment
Question by:bjawnie
[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
  • 5
  • 5
11 Comments
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 8080585
Set rs = objConn.execute("UPDATE pm SET read = 0 WHERE id = " & strid)
0
 

Author Comment

by:bjawnie
ID: 8080633
I didn't help get's the same error msg.
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 8080686
Set rs = objConn.execute("UPDATE pm SET read = 0 WHERE id = " & strid & ";")
0
Independent Software Vendors: 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!

 

Author Comment

by:bjawnie
ID: 8080727
still no change :(
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 8080765
Clutching @ straws here:

Set rs = objConn.execute("UPDATE [pm] SET [read] = 0 WHERE [id] = " & strid & ";")
0
 

Author Comment

by:bjawnie
ID: 8080801
No, that didn't help either. I confused :o(
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 8081069
Me too!
0
 

Author Comment

by:bjawnie
ID: 8084047
Found the problem.

It seems that I wasn't allowed to name a field "read" after changing it it works smooth.

Now how do I cancel this questiong?

/bjawnie
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 8086903
Ask a new question (0 points) inside http://www.experts-exchange.com/Community_Support/. Just copy the URL of THIS page into a message.
0
 

Author Comment

by:bjawnie
ID: 8087661
oki thanX
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 8091770
Points refunded and placed in PAQ

Computer101
E-E Admin
0

Featured Post

Industry Leaders: 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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

777 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