Flashcards
Untitled
Cards in this deck (2)
- 1Declare a SQL Connectionusing System.Data.SqlClient
SqlConnection conn; (global)
string conString; (global or local)
conn = new SqlConnection(conString);
conn.Open();
conn.Close(); - 2Read SQL dataSqlDataAdapter adapter = new SqlDataAdapter();
string sql = @"Select * FROM TableName";
SqlCommand command = new SqlCommand(sql, con);
adapter.SelectCommand = command;
Information
- Description
- Flashcards on Untitled, created by 1 1 on 14/06/2021.
- Created by
- 1 1
- Views
- 0
- Rating