|
 |
asp_databases thread: SV: RE: ADO error
Message #1 by =?us-ascii?Q?Hakan_Frennesson?= <hakan@c...> on Mon, 10 Sep 2001 14:41:13 +0200
|
|
Hi!
This is most likely an error due to improper file/folder permissions. Check
the permissions on the server where the database resides, not locally.
Hakan
-----Ursprungligt meddelande-----
Fran: Mark Eckeard [mailto:meckeard2000@y...]
Skickat: den 10 september 2001 14:25
Till: ASP Databases
Amne: [asp_databases] RE: ADO error
Kyle,
I have already tried that.
Straneg this is, this works locally for me. It's just
when I upload it to a different server, then it
doesn't. Could it possilby be a setting on the other
server?
Thanks,
Mark
--- Kyle Burns <kburns@c...> wrote:
> Off the bat, I'd say one way to help you would be to
> make use of the SQLstr
> variable that you have declared. Instead of setting
> rs (which at this point
> in your code is an instantiated recordset object) to
> a string, assign your
> SQL statement to SQLstr and pass this to the Execute
> method of your
> connection object (no need for the parens because
> you're not returning a
> value). See where this gets you and let us know.
>
> =================================
> Kyle M. Burns, MCSD
> ECommerce Technology Manager
> Centra Credit Union
> kburns@c...
>
>
>
> -----Original Message-----
> From: Mark Eckeard [mailto:meckeard2000@y...]
> Sent: Friday, September 07, 2001 10:42 AM
> To: ASP Databases
> Subject: [asp_databases] ADO error
>
>
> Hi,
>
> I am doing some charity web development work for a
> non-profit organization, and have uploaded a log in
> page using ASP and an Access 2000 DB. When the user
> logs in, I insert their name, today's date & time
> into
> the DB.
>
> This works fine locally, but when I upload it to
> their
> server, this is the error I am getting:
>
>
> Microsoft JET Database Engine error '80004005'
>
> Operation must use an updateable query.
>
> /demo/signup.asp, line 41
>
> Here is the code:
>
> <CODE>
>
> <% @language="vbscript"%>
>
> <%
>
> Dim strName, strPassword, strDate, strTime
>
> 'Create the date the visitor logged in.
> strDate = date()
> strTime = time()
>
>
> 'Get the variables from the form.
> strName = Request.Form("name")
> strPassword = Request.Form("password")
>
>
> Dim conn, rs, SQLstr
>
> 'Create our conn & rs objects.
> set conn=Server.CreateObject("ADODB.Connection")
> conn.Provider="Microsoft.Jet.OLEDB.4.0"
> conn.Open(Server.Mappath("login.mdb"))
> set rs = Server.CreateObject("ADODB.recordset")
> 'Execute the SQL to see if the name & password are
> in the table.
> rs.Open "Select * from members where name = '" &
> strname & "'", conn
>
> 'Let's evaluate the RS to see if it is null. If
> so,
> the name MUST NOT
> 'exist. We will enter the new name & password,
> capture the name and time
> 'logged in, then send them to the kinds links
> page.
>
> 'If RS is not null, the login name MUST exist. We
>
> will redirect them back
> 'to the signupagain page.
> if rs.BOF or rs.EOF then
> 'Add new member into DB.
> rs = "insert into members (name, [password],
> date_signup) values (""" & strName & """, """ &
> strPassword & """, """ & strDate& """)"
> conn.execute(rs) <<<<<---------------- line 41
>
> end if
>
> %>
>
> </CODE>
>
> Any ideas?!?
>
> Thanks,
>
> Mark
Message #2 by Schmitt Kurt-FKS043 <Kurt.Schmitt@m...> on Mon, 10 Sep 2001 08:49:00 -0400
|
|
See the following kb article to troubleshoot...
http://support.microsoft.com/support/kb/articles/Q175/1/68.ASP
HTH
Kurt Schmitt
-----Original Message-----
From: Hakan Frennesson [mailto:hakan@c...]
Sent: Monday, September 10, 2001 8:41 AM
To: ASP Databases
Subject: [asp_databases] SV: RE: ADO error
Hi!
This is most likely an error due to improper file/folder permissions. Check
the permissions on the server where the database resides, not locally.
Hakan
-----Ursprungligt meddelande-----
Fran: Mark Eckeard [mailto:meckeard2000@y...]
Skickat: den 10 september 2001 14:25
Till: ASP Databases
Amne: [asp_databases] RE: ADO error
Kyle,
I have already tried that.
Straneg this is, this works locally for me. It's just
when I upload it to a different server, then it
doesn't. Could it possilby be a setting on the other
server?
Thanks,
Mark
--- Kyle Burns <kburns@c...> wrote:
> Off the bat, I'd say one way to help you would be to
> make use of the SQLstr
> variable that you have declared. Instead of setting
> rs (which at this point
> in your code is an instantiated recordset object) to
> a string, assign your
> SQL statement to SQLstr and pass this to the Execute
> method of your
> connection object (no need for the parens because
> you're not returning a
> value). See where this gets you and let us know.
>
> =================================
> Kyle M. Burns, MCSD
> ECommerce Technology Manager
> Centra Credit Union
> kburns@c...
>
>
>
> -----Original Message-----
> From: Mark Eckeard [mailto:meckeard2000@y...]
> Sent: Friday, September 07, 2001 10:42 AM
> To: ASP Databases
> Subject: [asp_databases] ADO error
>
>
> Hi,
>
> I am doing some charity web development work for a
> non-profit organization, and have uploaded a log in
> page using ASP and an Access 2000 DB. When the user
> logs in, I insert their name, today's date & time
> into
> the DB.
>
> This works fine locally, but when I upload it to
> their
> server, this is the error I am getting:
>
>
> Microsoft JET Database Engine error '80004005'
>
> Operation must use an updateable query.
>
> /demo/signup.asp, line 41
>
> Here is the code:
>
> <CODE>
>
> <% @language="vbscript"%>
>
> <%
>
> Dim strName, strPassword, strDate, strTime
>
> 'Create the date the visitor logged in.
> strDate = date()
> strTime = time()
>
>
> 'Get the variables from the form.
> strName = Request.Form("name")
> strPassword = Request.Form("password")
>
>
> Dim conn, rs, SQLstr
>
> 'Create our conn & rs objects.
> set conn=Server.CreateObject("ADODB.Connection")
> conn.Provider="Microsoft.Jet.OLEDB.4.0"
> conn.Open(Server.Mappath("login.mdb"))
> set rs = Server.CreateObject("ADODB.recordset")
> 'Execute the SQL to see if the name & password are
> in the table.
> rs.Open "Select * from members where name = '" &
> strname & "'", conn
>
> 'Let's evaluate the RS to see if it is null. If
> so,
> the name MUST NOT
> 'exist. We will enter the new name & password,
> capture the name and time
> 'logged in, then send them to the kinds links
> page.
>
> 'If RS is not null, the login name MUST exist. We
>
> will redirect them back
> 'to the signupagain page.
> if rs.BOF or rs.EOF then
> 'Add new member into DB.
> rs = "insert into members (name, [password],
> date_signup) values (""" & strName & """, """ &
> strPassword & """, """ & strDate& """)"
> conn.execute(rs) <<<<<---------------- line 41
>
> end if
>
> %>
>
> </CODE>
>
> Any ideas?!?
>
> Thanks,
>
> Mark
Message #3 by "Drew, Ron" <RDrew@B...> on Mon, 10 Sep 2001 08:47:34 -0400
|
|
Hakan is Correct...also you may want to comment the execute on line 41 and
do a response.write of rs to make sure the server likes the sql command.
You may also want to do the same with the SELECT (assign it to rs and then
execute)
then do a quick display in a table. I ran into problems once with the
Server.Mappath
not working because of subdirectories, so you may also want to to a
response.write on the Server.Mappath("login.mdb")
Bottomline....use a little debugging ...normally I just comment the
debugging so if I modify I have an easy way to debug.
Good luck,
Ron
---Original Message-----
From: Hakan Frennesson [mailto:hakan@c...]
Sent: Monday, September 10, 2001 8:41 AM
To: ASP Databases
Subject: [asp_databases] SV: RE: ADO error
Hi!
This is most likely an error due to improper file/folder permissions. Check
the permissions on the server where the database resides, not locally.
Hakan
-----Ursprungligt meddelande-----
Fran: Mark Eckeard [mailto:meckeard2000@y...]
Skickat: den 10 september 2001 14:25
Till: ASP Databases
Amne: [asp_databases] RE: ADO error
Kyle,
I have already tried that.
Straneg this is, this works locally for me. It's just
when I upload it to a different server, then it
doesn't. Could it possilby be a setting on the other
server?
Thanks,
Mark
--- Kyle Burns <kburns@c...> wrote:
> Off the bat, I'd say one way to help you would be to
> make use of the SQLstr
> variable that you have declared. Instead of setting
> rs (which at this point
> in your code is an instantiated recordset object) to
> a string, assign your
> SQL statement to SQLstr and pass this to the Execute
> method of your
> connection object (no need for the parens because
> you're not returning a
> value). See where this gets you and let us know.
>
> =================================
> Kyle M. Burns, MCSD
> ECommerce Technology Manager
> Centra Credit Union
> kburns@c...
>
>
>
> -----Original Message-----
> From: Mark Eckeard [mailto:meckeard2000@y...]
> Sent: Friday, September 07, 2001 10:42 AM
> To: ASP Databases
> Subject: [asp_databases] ADO error
>
>
> Hi,
>
> I am doing some charity web development work for a
> non-profit organization, and have uploaded a log in
> page using ASP and an Access 2000 DB. When the user
> logs in, I insert their name, today's date & time
> into
> the DB.
>
> This works fine locally, but when I upload it to
> their
> server, this is the error I am getting:
>
>
> Microsoft JET Database Engine error '80004005'
>
> Operation must use an updateable query.
>
> /demo/signup.asp, line 41
>
> Here is the code:
>
> <CODE>
>
> <% @language="vbscript"%>
>
> <%
>
> Dim strName, strPassword, strDate, strTime
>
> 'Create the date the visitor logged in.
> strDate = date()
> strTime = time()
>
>
> 'Get the variables from the form.
> strName = Request.Form("name")
> strPassword = Request.Form("password")
>
>
> Dim conn, rs, SQLstr
>
> 'Create our conn & rs objects.
> set conn=Server.CreateObject("ADODB.Connection")
> conn.Provider="Microsoft.Jet.OLEDB.4.0"
> conn.Open(Server.Mappath("login.mdb"))
> set rs = Server.CreateObject("ADODB.recordset")
> 'Execute the SQL to see if the name & password are
> in the table.
> rs.Open "Select * from members where name = '" &
> strname & "'", conn
>
> 'Let's evaluate the RS to see if it is null. If
> so,
> the name MUST NOT
> 'exist. We will enter the new name & password,
> capture the name and time
> 'logged in, then send them to the kinds links
> page.
>
> 'If RS is not null, the login name MUST exist. We
>
> will redirect them back
> 'to the signupagain page.
> if rs.BOF or rs.EOF then
> 'Add new member into DB.
> rs = "insert into members (name, [password],
> date_signup) values (""" & strName & """, """ &
> strPassword & """, """ & strDate& """)"
> conn.execute(rs) <<<<<---------------- line 41
>
> end if
>
> %>
>
> </CODE>
>
> Any ideas?!?
>
> Thanks,
>
> Mark
|
|
 |