Solved

Error Trying To Use Delete Record Server Behavior

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unable to Connect Via FTP 109 1,251
Dreamweaver CS6 keyboard shortcut 8 1,044
Dreamweaver css dropdown will not show styles 8 697
What's Centering My Images ? 10 308
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

772 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