1 //1. Basic operation of database links (slightly)2 //2. Create an object function (critical section)3 Sqlconn.open ();4 //Initialize definition record Bar number5 intn =0;6 Objectobj = Sqlcomm.executescalar ();//The Create object (ExecuteScalar () function is the first column of data that gets the first row in the record being looked up. )7 int. TryParse (obj. ToString (), outn);//gets the number of record bars queried8 stringA = N.tostring ();//converts a record number int type to a string type before it can be displayed in a form9 stringLin ="Total Records";Ten stringKong =" ";//Space One stringKong1 =" ";//Space A stringKong2 =" ";//Space - stringKong3 =" ";//Space - stringJia = lin + kong + kong1 + kong2 +Kong3; theToolstripstatuslabel1.text = lin+a+"Strip"+kong+kong1+kong2;//Show in Form
These things are also slowly a little to find out, tidy up, record, square later use, not so hard to locate!
------------from the Lingbo hut----von and Super notes------
C # Operations database, which checks out the number of record bars displayed in the WinForm form in one of the methods