Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) 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
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 15th, 2005, 10:55 AM
Registered User
Join Date: Mar 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Duplicate Records

I'm using DWMX and SQL2K and would like to find out how to check if a record already exists for a particular field when a user submits the form. I'm using stored procedures and the command object in Dreamweaver. Also how would I redirect the user to another page if there is a duplicate record? Thanks!

Reply With Quote
  #2 (permalink)  
Old April 15th, 2005, 11:23 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: 100%
Activity: 100% Activity: 100% Activity: 100%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

To find out if a record exists, you can use IF EXISTS in a stored procedure.
Alternatively, just fire a normal SELECT query. If there are any records (the recordset is not EOF) then don't allow the insert, otherwise execute the INSERT statement.


Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Sabotage by Beastie Boys (Track 6 from the album: Ill Communication) What's This?
Reply With Quote

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
Duplicate Records in a table i_shahid SQL Language 2 February 7th, 2008 07:40 PM
duplicate records vanitha SQL Server 2000 4 June 2nd, 2007 04:35 PM
duplicate records vanitha Reporting Services 2 May 31st, 2007 01:54 AM
Delete Duplicate Records prasanta2expert SQL Server 2000 9 December 15th, 2006 10:44 PM
Deleting duplicate records ninel SQL Server 2000 3 June 14th, 2006 02:12 PM

All times are GMT -4. The time now is 06:33 PM.

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