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 statement and Date
Old 08-15-2007, 02:26 PM UPdate statement and Date
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Hey Guys, Hope all are doing well. I was able to set up a web server here at work and am back in the web dev business! Kind of..

Can I get a second set of eyes/

If I comment out the date lines in the sql statement, this works fine. With date lines running I get Syntax error in UPDATE statement.

Do I need to do something special with the date info to update ??

Thanks for any help. My code is below..

Chip

Code:
 
 
Dim strFormID, strFormLastName, strFormFirstName, strFormPosition, strFormCrew1, strFormCrew1C, strFormCrew2, strFormCrew2C, strFormCrew3, strFormCrew3C, strFormSimNo, strFormDate, strFormTimeIn, strFormTimeOut
 
 
strFormInstID = Trim(Request.Form("InstID"))
strFormCrew1 = Trim(Request.Form("Crew1"))
strFormCrew1C = Trim(Request.Form("Crew1C"))
strFormCrew2 = Trim(Request.Form("Crew2"))
strFormCrew2C = Trim(Request.Form("Crew2C"))
strFormCrew3 = Trim(Request.Form("Crew3"))
strFormCrew3C = Trim(Request.Form("Crew3C"))
strFormAircraft = Trim(Request.Form("Aircraft"))
strFormTimeIn = Trim(Request.Form("TimeIn"))
strFormTimeOut = Trim(Request.Form("TimeOut"))
strFormSimNo = Trim(Request.Form("SimNo"))
strFormDate = Trim(Request.Form("Date"))
 
 
 
strQ = "UPDATE Instructor SET Crew1 = '"
strQ = strQ & strFormCrew1
strQ = strQ & "', Crew1C = '"
strQ = strQ & strFormCrew1C
strQ = strQ & "', Crew2 = '"
strQ = strQ & strFormCrew2
strQ = strQ & "', Crew2C = '"
strQ = strQ & strFormCrew2C
strQ = strQ & "', Crew3 = '"
strQ = strQ & strFormCrew3
strQ = strQ & "', Crew3C = '"
strQ = strQ & strFormCrew3C
strQ = strQ & "', Date = '"
strQ = strQ & strFormDate
strQ = strQ & "', Aircraft = '"
strQ = strQ & strFormAircraft
strQ = strQ & "', TimeIn = '"
strQ = strQ & strFormTimeIn
strQ = strQ & "', TimeOut = '"
strQ = strQ & strFormTimeOut
strQ = strQ & "', SimNo = '"
strQ = strQ & strFormSimNo
strQ = strQ & "' WHERE InstID=" 
strQ = strQ & strFormInstID
strQ = strQ & ";"
objRS.Open strQ
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
 
Register now for full access!
Old 08-15-2007, 07:54 PM Re: UPdate statement and Date
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
date is a "reserved" word in SQL, and as such should not be used as a column name.
__________________
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 08-16-2007, 06:44 AM Re: UPdate statement and Date
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Thanks Chris, I'll change the name in my database. As always, I appreciate the help. I'm going to try to make the time to frequent more often... See you around.

Chip
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Reply     « Reply to UPdate statement and Date
 

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.11052 seconds with 12 queries