Protected void cmdok_click (Object sender, eventargs e) {// Add information stringbuilder SQL = new stringbuilder ("insert into m_phone (PID, phonename, num, price, phonetype, onselltime, color, weight, video, camera, phonesize, phonesystem, memorysize, phonedesc, standbytime, screensize, frequency, inputmethod, soundrecord, GPS, FM, MP3, email, infrared, game, clock, calendar, calculator, Bluetooth) "); SQL. append ("values (@ PID, @ text Phonename, @ textnum, @ textprice, @ dropphonetype2, @ textonselltime, @ textcolor, @ textweight ");................. sqlparameter [] paras = {New sqlparameter ("@ PID", sqldbtype. int, 4), new sqlparameter ("@ textphonename", sqldbtype. nvarchar, 50), new sqlparameter ("@ textnum", sqldbtype. int, 4), new sqlparameter ("@ textprice", sqldbtype. int, 4), new sqlparameter ("@ dropphonetype2", sqldbtype. varchar, 20), n EW sqlparameter ("@ textonselltime", sqldbtype. datetime, 8), new sqlparameter ("@ textcolor", sqldbtype. varchar, 20), new sqlparameter ("@ textweight", sqldbtype. nvarchar, 50 ),...........}; string [] stra = {dropphonetype. selectedvalue, textphonename. text, textnum. text, textprice. text, dropphonetype2.selectedvalue, textonselltime. text, textcolor. text, textweight. text ,.............}; int A = stra. leng Th; Int J; For (j = 0; j <A; j ++) {paras [J]. value = stra [J];} int strpid = 0; string sqla = SQL. tostring (); try {sqlhelper. excutenonqurey (sqla, commandtype. text, paras); // execute the add data strpid = convert. toint32 (sqlhelper. excutesclare (sqla, commandtype. text, paras); // obtain the ID number just inserted} catch (sqlexception ex) {cmdreturn. TEXT = ex. message. tostring ();} cmdreturn. TEXT = strpid. tostring ();.........