Professional Documents
Culture Documents
INSERT QUERY
Insert Query is used to add records to the database
Insert into [Table Name] Values (‘[Column 1]’,’[Column 2]’,’[Column 3]’,’[Column n]’)
Update [Table Name] set [Column Name] = ‘[Value]’ where [Column Name] = ‘[Value]’ and [Column Name] = ‘[Value]’
sa
User ID=
Imports System.Data.Oledb
-Includes the OLEDB library in your project.
OleDbConnection
-Connects your project to the database server using the “connectionString”
OleDbCommand
-Converts your String Query to an SQL Command
OleDbDataAdapter
-Used to exchange data from SQL Server and Project using the OleDBCommand
DataTable
-Stores records from query results
SETUP DATABASE QUERY FUNCTION
Output:
S3 = “abcdef”
GET RECORDS FROM
DATABASE
If ListView1.SelectedItems.Count = 1
-Checks if the user has selected a data from the listview
Listview1.SelectedItems(0).Text
-Data from the first column of the listview
ListView1.SelectedItems(0).SubItems(1).Text
-Data from the second column of the listview