|
 |
access_asp thread: Access behaving badly :(
Message #1 by "Sverrir Gunnlaugsson" <sverrir01@r...> on Wed, 9 Oct 2002 00:52:06
|
|
Hi ppl
I'm experiencing a little trouble with Access.
I have a table that I call ADGANGUR and in it I have 7 fields.
One of those is a text field 10 char in length that I call Password.
My problem is that I can do every action on this table from inside
Access, insert, update delete but as soon as I go through my
Web interface I?ll get an insert, update or delete error on that field!
If I work with any other field in this table through the web interface
everything works fine.
As you can see I?m quite puzzled by this.
And I?ve written out the Sql strings to make sure they have everything in
them that should be there.
SQL strings
//This doesn't work
strSql = "UPDATE adgangur SET password = '"+password2+"' WHERE id = "+
id+" ?;
//This works
strSql = "INSERT INTO Adgangur(Nafn,Email,Username,Userlevel) VALUES
('"+nafn+"','"+email+"','"+user+"','"+level+"')";
//This doesn't work
strSql = "INSERT INTO Adgangur(Nafn,Email,Username,Userlevel,Password)
VALUES('"+nafn+"','"+email+"','"+user+"',"+level+",'"+passw+"')";
Thanks in advance for any help you might offer.
Cheers
Sverrir
PS
I'm using JScript if that makes any difference.
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 9 Oct 2002 11:27:47 +1000
|
|
Next time please post the exact error message and error code that you are
getting.
That said, you should probably look at:
http://www.adopenstatic.com/faq/80040e14.asp#scenario2a
(Syntax error in INSERT INTO statement)
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Sverrir Gunnlaugsson" <sverrir01@r...>
Subject: [access_asp] Access behaving badly :(
: Hi ppl
:
: I'm experiencing a little trouble with Access.
: I have a table that I call ADGANGUR and in it I have 7 fields.
: One of those is a text field 10 char in length that I call Password.
:
: My problem is that I can do every action on this table from inside
: Access, insert, update delete but as soon as I go through my
: Web interface I?ll get an insert, update or delete error on that field!
:
: If I work with any other field in this table through the web interface
: everything works fine.
:
: As you can see I?m quite puzzled by this.
: And I?ve written out the Sql strings to make sure they have everything in
: them that should be there.
:
: SQL strings
:
: //This doesn't work
: strSql = "UPDATE adgangur SET password = '"+password2+"' WHERE id = "+
: id+" ?;
:
: //This works
: strSql = "INSERT INTO Adgangur(Nafn,Email,Username,Userlevel) VALUES
: ('"+nafn+"','"+email+"','"+user+"','"+level+"')";
:
: //This doesn't work
: strSql = "INSERT INTO Adgangur(Nafn,Email,Username,Userlevel,Password)
: VALUES('"+nafn+"','"+email+"','"+user+"',"+level+",'"+passw+"')";
:
: Thanks in advance for any help you might offer.
:
: Cheers
: Sverrir
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by "Sverrir Gunnlaugsson" <sverrir01@r...> on Wed, 9 Oct 2002 20:46:14
|
|
Hi Ken
You were right of course :)
Password is reserved.
The reason I did not post the error message was that
all I got was: "Error in INSERT statement" and yes I've turned off
HTTP friendly errors.
Better use myPassword for the field name.
But thanks again.
Cheers mate
Sverrir
> Next time please post the exact error message and error code that you
are
getting.
That said, you should probably look at:
http://www.adopenstatic.com/faq/80040e14.asp#scenario2a
(Syntax error in INSERT INTO statement)
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Sverrir Gunnlaugsson" <sverrir01@r...>
Subject: [access_asp] Access behaving badly :(
: Hi ppl
:
: I'm experiencing a little trouble with Access.
: I have a table that I call ADGANGUR and in it I have 7 fields.
: One of those is a text field 10 char in length that I call Password.
:
: My problem is that I can do every action on this table from inside
: Access, insert, update delete but as soon as I go through my
: Web interface I?ll get an insert, update or delete error on that field!
:
: If I work with any other field in this table through the web interface
: everything works fine.
:
: As you can see I?m quite puzzled by this.
: And I?ve written out the Sql strings to make sure they have everything
in
: them that should be there.
:
: SQL strings
:
: //This doesn't work
: strSql = "UPDATE adgangur SET password = '"+password2+"' WHERE id = "+
: id+" ?;
:
: //This works
: strSql = "INSERT INTO Adgangur(Nafn,Email,Username,Userlevel) VALUES
: ('"+nafn+"','"+email+"','"+user+"','"+level+"')";
:
: //This doesn't work
: strSql = "INSERT INTO Adgangur(Nafn,Email,Username,Userlevel,Password)
: VALUES('"+nafn+"','"+email+"','"+user+"',"+level+",'"+passw+"')";
:
: Thanks in advance for any help you might offer.
:
: Cheers
: Sverrir
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
 |