Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-08-01 : 09:01:01
|
Kiran writes "I'm using a Microsoft Access database where I want to update one column and then redirect the user to a different page. My problem is that the UPDATE tablename SET column=value doesn't seem to work. I tried to set Response.Buffer=true, but still it won't update my records or do strange things.My code's along the lines of:Response.Buffer=true;sql="UPDATE Users SET Users.online='true' WHERE Users.Username='"+name+"' ;";conn.Execute(sql);Response.Redirect('Somepage.asp');How can I make sure Access updates my records before redirecting to another page?ThanksKiranPS:I hate access!!" |
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2002-08-04 : 21:59:42
|
quote: sql="UPDATE Users SET Users.online='true' WHERE Users.Username='"+name+"' ;";
this going to sound silly, I know, but try this:sql="UPDATE [Users] SET [Users].[online]='true' WHERE [Users].[Username]='"+name+"' ;";Access would be better if it enforced anyone of the seven "standard approaches" it allows...--I hope that when I die someone will say of me "That guy sure owed me a lot of money" |
 |
|
Tim
Starting Member
392 Posts |
Posted - 2002-08-04 : 22:34:41
|
what is the second semi colon doing at the end of the statement which assigns a value to the sql string (ie: outside the qutation marks)?I would have thought ASP would throw an "Expected end of statement" error for this... Someone fill me in? |
 |
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2002-08-04 : 22:39:29
|
Woopssorry - should have picked that up - been looking at too much javascript...I believe you'll find you may still need the []s though...--I hope that when I die someone will say of me "That guy sure owed me a lot of money"Edited by - rrb on 08/04/2002 22:40:16 |
 |
|
|
|
|