Solved

MESSAGE error near where

Posted on 2014-11-17
2
52 Views
Last Modified: 2014-12-22
I can not for the life of me see an error in this sql statement

insertprinterm = "insert into printer_maintanence (photoconductor, cartridge_yellow, cartridge_cyan, cartridge_magenta, cartridge_black, maintanence_kit, transfer_belt, wastebox, duplexer)  values(" & photo & "," & yellow & "," & cyan & "," & magenta & "," & black & "," & maint & "," & transfer & "," & waste & "," & duplexor & ")  where whatip = '" & thisip & "' AND whatdate = '" & thisdate & "'  "

thanks
gary
0
Comment
Question by:javagair
[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 Comments
 
LVL 22

Expert Comment

by:p_davis
ID: 40447856
you have the '" on either side of your where statement but not for each parameter.
0
 
LVL 14

Accepted Solution

by:
CtrlAltDl earned 500 total points
ID: 40448097
"maintanence" is misspelled, but if it is also misspelled in the database then that isn't the problem.

Unless your values are all integers they should also be enclosed in single quotes.
 values('" & photo & "'
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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…

756 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