Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 24th, 2007, 06:58 PM
Registered User
Join Date: Jan 2007
Location: , , .
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>")
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


Reply With Quote
  #2 (permalink)  
Old January 24th, 2007, 08:30 PM
Friend of Wrox
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts

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:
response.write "Update Tabela set Username='"&request.form("user")&"' where id="&request.querystring("edit")
Woody Z
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

All times are GMT -4. The time now is 07:23 PM.

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