初始化
This commit is contained in:
23
SQLServerTest/Program.cs
Normal file
23
SQLServerTest/Program.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Data;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Test;
|
||||
|
||||
namespace SQLServerTest
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
string sssql = @"select B.ID HotelID,B.Code,A.RoomNumber,A.HostNumber,A.LanIP,A.LanPort,A.ID from tb_Hosts A
|
||||
inner join tb_Sys_Hotels B
|
||||
on A.HotelID=B.ID
|
||||
where MAC=@MAC;";
|
||||
|
||||
var sql = new SqlParameter("@MAC", "aa-bb-cc");
|
||||
DataTable dt = SQLServerDBHelper.GetTable(sssql, new SqlParameter[] { sql });
|
||||
Console.WriteLine("Hello, World!");
|
||||
Console.ReadKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user