Computing.Net > Forums > Programming > SQL: Can anyone see the problem?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

SQL: Can anyone see the problem?

Reply to Message Icon

Name: mking (by mkingrey)
Date: September 21, 2005 at 10:16:39 Pacific
OS: XP
CPU/Ram: xp
Comment:

SQL.CommandText = "INSERT Into Jobs (JobNo, DateStarted, DateFinished, Customer, TotalFee, Notes, Open) VALUES ('" & varJobNo & "', '" & varSelectedDate & "', 'n/a', '" & varCustomerID & "', '" & GrandTotal & "', '" & varNotes & "', 'Yes')"

My SQL statement works fine until I add the last field which is "Open" with a value of "Yes." The error is apparently in this part:

& "', 'Yes')"



Sponsored Link
Ads by Google

Response Number 1
Name: Chi Happens
Date: September 22, 2005 at 07:46:48 Pacific
Reply:

When does this error occur? During execution or when you simply try to run the program? (meaning it is a syntax error)

If it is an actual SQL error that gets generated when you attempt to execute the TSQL statement, what is that error (meaning what does it say is the error)?

It is possible that the field type OPEN is not a text field and/or that it does not allow for 3 letters.

Let me know more details and I can help.

Chi

They mostly come at night...mostly.


0

Response Number 2
Name: mking (by mkingrey)
Date: September 22, 2005 at 09:27:13 Pacific
Reply:

For some reason it would not work with the field name "Open" when I changed it to "OpenClose" it worked fine.

Thanks,

Matt


0

Response Number 3
Name: Chi Happens
Date: September 22, 2005 at 10:11:06 Pacific
Reply:

Then the Field name must be OpenClose lol

Chi

They mostly come at night...mostly.


0

Response Number 4
Name: mking (by mkingrey)
Date: September 25, 2005 at 20:50:35 Pacific
Reply:

No, I mean I had to change the field name in the database as well as in the code from "Open."


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


.ksh mysql sqlplus questi... Batch File Help



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: SQL: Can anyone see the problem?

VB6 problem www.computing.net/answers/programming/vb6-problem/11320.html

SQL help www.computing.net/answers/programming/sql-help/11028.html

Urgent!!!Can't compile the .java file www.computing.net/answers/programming/urgentcant-compile-the-java-file-/226.html