Answers for "C# mssql query"

SQL
0

c# Select MSSQL

DataSet ds = new DataSet();
//https://www.oracle.com/webfolder/technetwork/tutorials/obe/db/dotnet/ODPNET_Core_get_started/index.html
using (SqlConnection con = new SqlConnection(connectionstr))
{
    using (SqlCommand cmd = con.CreateCommand())
    {
        con.Open();
        cmd.CommandText = "select * from master.sys.server_principals";
        SqlDataAdapter adapter = new SqlDataAdapter(cmd);
        adapter.Fill(ds);
    }
}
Posted by: Guest on January-21-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language