Solved

Error Trying To Use Delete Record Server Behavior

Posted on 2003-11-10
5
313 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:WarCrimes
  • 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:WarCrimes
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:WarCrimes
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:WarCrimes
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now