Hie... i gone through and got error today that if i'm inserting record it even exists in database i want to insert it and get the last updated record primary key then its better to use the @@Identity for that or else i 've an simple technique for that...
Nothing we've to do, just save the system current Date while saving the record then get that record with help of the date and with corresponding Email.
info.dateandtime =DateTime.Now.ToString();
Nothing we've to do, just save the system current Date while saving the record then get that record with help of the date and with corresponding Email.
info.dateandtime =DateTime.Now.ToString();
string getrecord = "select id from tblcontact where email= '" + info.email + "' and dateandtime='" + info.dateandtime + "'";
Will helps you.... or else use @@identity
Good post ..
ReplyDelete