Question: Help for sql C# data table Write a C# windows form program with a DataTable and DataGrid. For the DataTable, add a DataTable by program
Help for sql C# data table
Write a C# windows form program with a DataTable and DataGrid.
For the DataTable, add a DataTable by program control. Have six columns and add data for five rows.
Add your own data to the DataTable.
The columns should be:
ID, LastName, FirstName, Age, GPA, Birthday.
Read all the data from the DataTable and display to a RichTextBox under program control.
Drag a DataGrid to the form during design time. Read all the data from the DataTable and write to the DataGrid under program contrPut your picture and class information in the lower right hand side of the form. Rename the default form1 class to the name of your program and add to the form text title bar the name of your program.
Form with 1 button and a rich text box.
Format should be as such
SQLiteConnection.CreateFile("..\\..\\MyDatabase.sqlite"); string dbConnectionString = "Data Source = ..\\..\\MyDatabase.sqlite, Version = 3; foreign key = true; "; MessageBox.Show(dbConnectionString); SQLiteConnection dbConnection = new SQLiteConnection(dbConnectionString); dbConnection.Open();
string sql = "CREATE TABLE Student(ID INTETGER PRIMARY KEY, Name TEXT NOT NULL, Score INTEGER NOT NULL, GPA REAL NOT NULL)"; MessageBox.Show(sql); SQLiteCommand command = new SQLiteCommand(sql, dbConnection); command.ExecuteNonQuery();
sql = "INSERT INTO Student(ID, Name, Score, GPA) VALUES(NULL, 'Chad' , 3000, 3.72)"; command = new SQLiteCommand(sql, dbConnection); command.ExecuteNonQuery();
Having problem with DATA source. need to pull System.Data.SQLite.dll from a created folder connected to the c# program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
