Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Error Trying To Use Delete Record Server Behavior

Posted on 2003-11-10
5
318 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

829 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