Get the App
SLTechnology News&Howtos  ›  Database  › 

C # SQL package (2)

Shulou Source: shulou.com Published: 2022-06-01 21:22:50 11月15日 Update

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-

Tags: Caching encapsulation success data database results updates testing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Linux Apple Docker Microsoft