Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 24th, 2007, 06:58 PM
Registered User
 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default need help!!!

ok, i`m new in asp.i`ve made access database end i`ve 'tried' to make a code:
   __________________________________________________ ____
<%
baza="Data Source=" & Server.Mappath("db1.mdb") & ";Provider=Microsoft.Jet.OLEDB.4.0;"
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open baza
set rs=Conn.execute("select * from Tabela")
if not rs.eof then
response.write ("<table border='1' align='center' cellspacing='0' cellpadding='0' bgcolor='#CCCCCC'>")
do while not rs.eof
Response.write("<tr><td><form><input type='text' name='user' id='user' value="&rs("Username")&"></form></td><td><a href='baza.asp?edit="&rs("id")&"'>UPDATE</a></td><td><a href='#'>DELETE</a></td></tr>")
rs.movenext
loop
end if
if request.querystring("edit")<>"" then
Conn.execute("Update Tabela set Username='"&request.form("user")&"' where id="&request.querystring("edit")&"")

end if
%>
      __________________________________________________ ________
and when i try to update an new value over the existing one in my database, i`m giving this result:

Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters.

/baza.asp, line 21



HELP!!!


 
Old January 24th, 2007, 08:30 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You need to verify that you have valid values for both of your request variables that are used in your update -

Do a response.write of the update statement to see if it is valid. I notice that you are using both the form and the querystring to get values - which perhaps is okay, but not commonly done and might be the cause of your problem.

Comment out the "Conn.Execute" line and replace it with the following two lines. This will display your sql so you can verify it is correct:
Code:
response.write "Update Tabela set Username='"&request.form("user")&"' where id="&request.querystring("edit")
response.end
Woody Z
http://www.learntoprogramnow.com









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.