p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   help: check duplication when do update in datagrid (http://p2p.wrox.com/showthread.php?t=24758)

blur_ivy January 30th, 2005 09:04 AM

help: check duplication when do update in datagrid

  i've a editable datagird which let the user update the table.
 when the user click the update button , it will check whether the data it enter in the name field is already in the database, if it already exits ten it will return false.. else true.

i've tried string checkCmd = "SELECT Count(*) FROM tblConstType WHERE constName = " + "'" + role + "'";

using this, but if the result is "1" , it means 2 things, one is its own record (ther user din modify the data in this(name) textbox) or there is another record in the database. so if it is its own record, i would like to let the datagrid continue updating the record.

i'd try b4 to get the initial value of the textbox in the datagrid EditCommand (but seems fail currently..) to allow update action happen when it is its own record.. so i wonder is there any way to perform this task? ( allowing update when it is its own record")

really hope to get some help here.. thanks...

All times are GMT -4. The time now is 09:42 PM.

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