Solved

Error Trying To Use Delete Record Server Behavior

Posted on 2003-11-10
5
319 Views
Last Modified: 2011-09-20
Hello,

I am just starting to learn how to run a web server and set up dynamic web pages.  I'm currently working on a very simple news update page.  I can add new messages, and I also have a page that lists all the messages in my Access database.  I am currently trying to create a page that pops up when the user wants to delete a message from the database.  I can pass the message ID to the correct page.  That seems to work fine.

The problem is that while trying to make the delete.asp page, it won't let me choose Delete Record from the Server Behaviors list.  I get the Error Message: 'Before using this server behavior, please create a Recordset.'

But I already have created a Recordset, which shows up in the Server Behavior window.  I can do other things like Repeat Region.  Anyone have any clue as to what I can do to make this work?

Cory
0
Comment
Question by:Cory Vandenberg
  • 3
  • 2
5 Comments
 
LVL 1

Expert Comment

by:gabss
ID: 9722263
hi  WarCrimes

you need to first make recordset that is filtered by the id that you passing to it... all on the delete page..

Basically your delete need to know what u want to delete...

With out a recordset how is the page meant to know what where and which record...

so...
Add a record set >> filter by ID (normally id depends on how your doinig) >> where id = url parameters

hope this helps

G

http://www.0103media.co.uk
0
 
LVL 18

Author Comment

by:Cory Vandenberg
ID: 9722692
gabss,

Ok, so let me get this straight.

I need the filter not only on the Recordset on the page that passes the info, but ALSO on the page receiving the info??

All the tutorials I have seen so far just have the filter on the page sending the info.

WarCrimes
0
 
LVL 18

Author Comment

by:Cory Vandenberg
ID: 9722855
Oops,

Strike that previous comment.  They should let you edit those ya know.

Anyways, the filter by id is only on the question page (the page receiving the info), not on the one sending the info as well.

After setting up the Recordset, I put in test values and test it, and I get correct data from my database, but it still say I need to set up a Recordset when I try to select Delete Record from the server behavior.

I can do other things like Insert Record.  In fact when I click one of the Delete links on my page that lists the News Items, it correctly loads the delete.asp page with the right info from my database.  An example url such as:

http://localhost/BDLP/delete.asp?id=7

So the filter is working.  Any more ideas?

WarCrimes
0
 
LVL 1

Accepted Solution

by:
gabss earned 50 total points
ID: 9722917
The delete need the filter too..


no question....

as i said above if you just pass an id how can it find that record without a recordset that filtered...


right if you have a edit page as in ...
>>you pass id var by session/url params....
>> edit page filters by iD ...

same process for the delete you just dont see any of it

hope this helps..


G
0
 
LVL 18

Author Comment

by:Cory Vandenberg
ID: 9723246
gabss,

Don't ask me why, but I had a feeling....

I restarted my computer, and voila!!  It started working the way it was supposed to.  I had shut down Dreamweaver before and restarted it, but that didn't do any good.  Guess my PC just needed to reorganize itself.

Thanks for trying to help.  I appreciate the rapid response if nothing else, so enjoy the points.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question