Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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


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

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