Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

C # SQL package (2)

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Connect to C # SQL package (1)

Start the test of operating the database:

Using System

Using System.Collections.Generic

Using System.Linq

Using System.Text

Using DBDome.com

Using DBDome.model

Using System.Data.SqlClient

Using System.Data

Namespace DBDome

{

Class Program

{

Static void Main (string [] args)

{

User kayer_new = new User ()

Kayer_new.name = "kayer"

Kayer_new.sex = 1

Kayer_new.lv = 1

Kayer_new.username = "Kayer"

Kayer_new.userpwd = "123"

String into_sql = SQL_Structure.ADD_T_SQL (kayer_new)

Console.WriteLine (into_sql)

SqlParameter [] a = SqlParameter_Structure.ADD_T_SQL (kayer_new)

String c = SqlHelper.connectionString

Console.WriteLine (c)

Int I = SqlHelper.ExecteNonQuery (CommandType.Text, into_sql, a)

If (I > 0)

{

Console.WriteLine ("Operation performed successfully")

}

Else

{

Console.WriteLine ("failed to perform operation")

}

Console.Read ()

}

}

}

Results:

Delete-change-check will be updated one after another-

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report