S sanqou Unregistered / Unconfirmed GUEST, unregistred user! 2005-10-31 #1 (初学问题) 有一字段,不能重复,其他可以重复,在增加时,先如何判断
S sanqou Unregistered / Unconfirmed GUEST, unregistred user! 2005-10-31 #2 (初学问题) 有一字段,不能重复,其他可以重复,在增加时,先如何判断
C chrysalis Unregistered / Unconfirmed GUEST, unregistred user! 2005-10-31 #3 什么意思? 说清楚一点,这个字段是不是数据库的字段? 如果是这样可以这样实现! SqlDataReader mRead=mCommand.ExecuteRead("select * from TableName " if(mRead.Read()) { if (mRead["Filename"].ToString=="字段名" { Response.Wirte("<script>alert('字段存在!')</script>" return; } }
什么意思? 说清楚一点,这个字段是不是数据库的字段? 如果是这样可以这样实现! SqlDataReader mRead=mCommand.ExecuteRead("select * from TableName " if(mRead.Read()) { if (mRead["Filename"].ToString=="字段名" { Response.Wirte("<script>alert('字段存在!')</script>" return; } }
G gaosx Unregistered / Unconfirmed GUEST, unregistred user! 2005-11-26 #4 SqlDataReader mRead=mCommand.ExecuteRead("select * from TableName where read = '"+ filename +"'" if(mRead.HasRows) { Response.Wirte("<script>alert('字段存在!')</script>" }
SqlDataReader mRead=mCommand.ExecuteRead("select * from TableName where read = '"+ filename +"'" if(mRead.HasRows) { Response.Wirte("<script>alert('字段存在!')</script>" }