Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 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
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 14th, 2003, 02:02 AM
Friend of Wrox
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default Duplication problem

I have data in the software table like this

------------------------- -------
Microstation windows 98 se comp1
Windows 2000 Professional comp1
Adobe Acrobat 4.0 comp1
Windows xp Comp2
Anti vurus comp2

coding is

for x = 1 to Request.Form("software").Count

ssql="select '"&Request.Form("software").Item(x)&"' from software where stn_no='"& (stn_no) &"'"


set rs=cn.Execute(ssql)

if rs.eof=false then

x=server.URLEncode("Software already exit")

Response.Redirect("inv_update_response3.asp?msg=" & x)


for x = 1 to Request.Form("software").Count

    sql = "insert into software (software,stn_no) values ("
    sql = sql & "'" & Request.Form("software").Item(x) & "','" & stn_no & "')"

cn.Execute sql

multiple value (software) received from the asp page.

what condition (loop) will apply that if software not exit it should be move to next coding and
insert records and if software exit it not insert duplicate records ?

this condition check only single record, when multiple records
received, it does not work, and insert duplicate records.

Please help

Closed Thread

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
how to avoid duplication of data navbingo20 ASP.NET 2.0 Basics 9 June 8th, 2008 12:14 PM
Content duplication on first page of web site David C Veeneman BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 May 7th, 2006 04:41 PM
loop problem - duplication crmpicco Classic ASP Basics 1 March 18th, 2005 11:19 AM
help: check duplication when do update in datagrid blur_ivy Classic ASP Basics 0 January 30th, 2005 09:04 AM
show one record if there are duplication yylee Access 1 January 9th, 2005 05:57 AM

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

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