Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP 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
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old June 13th, 2004, 08:28 AM
Authorized User
 
Join Date: Jun 2004
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dorothee
Default

ok.
Search page by ID. then show records page, then hyperlink to details page if the record exists or new details page if it doesnot. Either way, choose the device type. if the device type is a pc, it redirects to pc.aspx. now if the pc dataset has a record, it will show the details. if it hasn't got anything it will just show the ID created previously.
that would be an insert if there's no details and that would be an update if some fields are updated.

I know I am not too logical 'cos I am a girl. but.. I am trying...

Reply With Quote
  #12 (permalink)  
Old June 13th, 2004, 09:01 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Right, I see (partially; I am still not sure what kind of app you're building. I tend to find "Either way, choose the device type. if the device type is a pc, it redirects to pc.aspx. now if the pc dataset has a record, it will show the details. if it hasn't got anything it will just show the ID created previously." to be quite abstract. But that doesn't really matter).

There may be other ways to do this with the Dreamweaver server behaviors, but personally, I think I'd go for a custom solution.

Here's what you should do:

1. Create a new ASPX page
2. In Page_Load, retrieve the PC based on the incoming ID parameter.
3. Try to retrieve the associated record (at least, that's how I understand it is supposed to work). If it exists, save that record's ID to a hidden field in the page, and prepopulate the controls with the record's values. If it doesn't exist leave the hidden ID empty, and display empty controls.
4. In the click event of the Save button, look at the hidden ID field. If it's empty, perform an Insert, otherwise perform an Update against your datasource.

By dropping the DW behaviors, you have full control over what you're doing. It may be a bit more work at first, but I am convinced you'll end up with a page that is much easier to extend and maintain.


Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a new record between two existing records hsncompany BOOK: Beginning Access 2003 VBA 0 April 13th, 2008 03:36 PM
insertion of records in database MunishBhatia SQL Server 2005 1 December 12th, 2006 09:25 PM
Check For Existing Folders & Files zandermax Access VBA 2 September 30th, 2005 11:43 AM
How to check whether a filie is existing szms VB.NET 2002/2003 Basics 2 December 6th, 2004 03:49 PM
Check for existing record echajmovic Access 1 November 3rd, 2003 08:03 PM



All times are GMT -4. The time now is 11:44 AM.


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