Solved

MESSAGE error near where

Posted on 2014-11-17
2
44 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
2 Comments
 
LVL 22

Expert Comment

by:p_davis
Comment Utility
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
Comment Utility
"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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
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.

744 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

15 Experts available now in Live!

Get 1:1 Help Now