Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Whats wrong in this SQL query?

Status
Not open for further replies.

Fredde

Programmer
May 10, 2001
22
0
0
SE
I'm a beginner to ASP/SQL and I just can't seem to figure out what's wrong with this SQL statement where I try to update the column "proj1" in the table "hours" with the integer "P1". I keep getting "SQL statment error"!?

sql = "UPDATE hours FIELDS (proj1) VALUE ('"&p1&"') WHERE (Ar="& Datepart("yyyy",Date) &" AND Week="& Session("Week") &" AND Namn='" & Session("Login")& "');"

/fredde
 
Hiya Fredde,

The command you need is:
sql = "UPDATE hours
SET proj1 = p1
WHERE (Ar="&
Datepart("yyyy",Date) &" AND Week="& Session("Week") &" AND
Namn='" & Session("Login")& "');"

HTH

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top