Error in UPDATE
am 13.06.2005 16:40:00 von Alessandro Panzetta
Guys I'm writing the code for a page where users whould be able to
change their password but I receive an erron in the UPDATE query; I've
tried running the query directly into the db and this works and I have
no idea on how to solve this. Hereafter the code that is causing the
error (the db is an Access db):
<%
Dim cnnDBEdit
Dim strSQL
CONN_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data
SourceC:\Inetpub\wwwroot\db\users.mdb;"
strSQL = "UPDATE Users SET Password = ""00001"" WHERE (Users =
""00001"");"
Set cnnDBEdit = Server.CreateObject("ADODB.Connection")
cnnDBEdit.Open CONN_STRING
cnnDBEdit.Execute strSQL, adAffectAll, adCmdText Or adExecuteNoRecords
cnnDBEdit.Close
Set cnnDBEdit = Nothing
%>
Re: Error in UPDATE
am 13.06.2005 16:51:50 von reb01501
Ale wrote:
> Guys I'm writing the code for a page where users whould be able to
> change their password but I receive an erron in the UPDATE query;
What error???
> I've
> tried running the query directly into the db and this works and I have
> no idea on how to solve this. Hereafter the code that is causing the
> error (the db is an Access db):
>
>
> <%
> Dim cnnDBEdit
> Dim strSQL
> CONN_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> SourceC:\Inetpub\wwwroot\db\users.mdb;"
> strSQL = "UPDATE Users SET Password = ""00001"" WHERE (Users =
> ""00001"");"
> Set cnnDBEdit = Server.CreateObject("ADODB.Connection")
> cnnDBEdit.Open CONN_STRING
> cnnDBEdit.Execute strSQL, adAffectAll, adCmdText Or adExecuteNoRecords
This should be
cnnDBEdit.Execute strSQL,, adCmdText + adExecuteNoRecords
or
cnnDBEdit.Execute strSQL, , 129
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: Error in UPDATE
am 13.06.2005 18:52:25 von Alessandro Panzetta
It now reports "ASP_0177_:_800401f3 Server.CreateObject ..:" error. I
already re-registered the scrrun.dll as suggested in most forums
without success.
The problem is that I run this asp on different locations wth different
errors, that's to say:
Winxp+SP2 with PWS Installed: "Error in the UPDATE"
Win2k+SP4 with IIS Installed : the error above
I have no clue :|
Re: Error in UPDATE
am 13.06.2005 19:11:21 von reb01501
Ale wrote:
> It now reports "ASP_0177_:_800401f3 Server.CreateObject ..:" error.
There's more to that error message isn't there? Can't you tell us what line
of code is causing the error?
> I
> already re-registered the scrrun.dll as suggested in most forums
> without success.
That would be the correct solution if a scripting object was causing the
problem
> The problem is that I run this asp on different locations wth
> different errors, that's to say:
> Winxp+SP2 with PWS Installed: "Error in the UPDATE"
> Win2k+SP4 with IIS Installed : the error above
> I have no clue :|
Neither do I. You haven't provided enough information. Create a test page
containing only the minimum lines of code needed to generate the error. Show
us that code and the entire error message.
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: Error in UPDATE
am 13.06.2005 19:22:50 von Alessandro Panzetta
The code is posted in the first message of this thread, the error code
(from the IIS log) is in italian and says:
"ASP_0177_:_800401f3|Impossibile_eseguire_il_metodo_Server.C reateObject"
that means that it's impossible to execute Server.CreateObject, in this
case it's the ADODB.Connection. I thought it was related to MDAC and I
installed it but still the problem persists.
Re: Error in UPDATE
am 13.06.2005 23:59:23 von reb01501
Ale wrote:
> The code is posted in the first message of this thread, the error code
> (from the IIS log) is in italian and says:
> "ASP_0177_:_800401f3|Impossibile_eseguire_il_metodo_Server.C reateObject"
> that means that it's impossible to execute Server.CreateObject, in
> this case it's the ADODB.Connection. I thought it was related to MDAC
> and I installed it but still the problem persists.
On the Win2K machine, run Windows Setup, using the /Repair option (see a
Windows server newsgroup for more details).
On the winXP machine, fix the connection.execute line as stated in my
earlier reply.
Bob barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"