C # Operations database, which checks out the number of record bars displayed in the WinForm form in one of the methods

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.