Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
UPDATE error - can't see what I am missing..
Old 02-24-2006, 02:05 AM UPDATE error - can't see what I am missing..
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Can someone help me with a`set of eyes to look at this? I just can't see what I am missing..

-------
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
/admin/usedequip/update.asp, line 79


----

My Code:

<%
Dim strItemID
Dim strDescription
Dim strPrice
Dim strNotes
Dim strThumb
Dim strPhoto
strItemID = Trim(Request.Form("ItemID"))
strDescription = Trim(Request.Form("Description"))
strPrice = Trim(Request.Form("Price"))
strNotes = Trim(Request.Form("Notes"))
strThumb = Trim(Request.Form("Thumb"))
strPhoto = Trim(Request.Form("Photo"))

Dim objConn, objRS, strQuery
Dim strConn
set objConn = Server.CreateObject("ADODB.Connection")
strConn = "Data Source=catalog1;"
objConn.Open strConn
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS.ActiveConnection = objConn

strQuery = "UPDATE usedequip001 SET Description = '"
strQuery = strQuery & strDescription
strQuery = strQuery & "', Price = "
strQuery = strQuery & strPrice
strQuery = strQuery & ", Notes = '"
strQuery = strQuery & strNotes
strQuery = strQuery & "', Thumb = '"
strQuery = strQuery & strThumb
strQuery = strQuery & "', Photo = "
strQuery = strQuery & strPhoto
strQuery = strQuery & " WHERE ItemID="
strQuery = strQuery & strItemID
strQuery = strQuery & ";"
objRS.Open strQuery
%>Thanks



Last edited by ChipJohns; 02-24-2006 at 02:08 AM..
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
 
Register now for full access!
Old 02-24-2006, 05:14 AM Re: UPDATE error - can't see what I am missing..
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Can you Response.Write your SQL Statement after it's been built and post it?
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 02-24-2006, 05:24 PM Re: UPDATE error - can't see what I am missing..
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Hi Minaki


I'm not sure how I would response.write an UPDATE statement?

How would I do this..??
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 02-25-2006, 12:11 PM Re: UPDATE error - can't see what I am missing..
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
respone.write strQuery before the objRS.Open
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-25-2006, 04:57 PM Re: UPDATE error - can't see what I am missing..
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Thanks-- Did it and it worked. I had a missing field. everything that was there was ok. It's what wasn't there.. That's why I couldn't see it and of course not knowing what fields are in my database, you would have no idea! But when I did a response.write on each item, it stuck out like a sore thumb. Saw just what was missing.

When I grow up, i wanna be just like you guys (and gals) @;-)


Thanks again..

Chip
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Reply     « Reply to UPDATE error - can't see what I am missing..
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15966 seconds with 12 queries