Dim connStr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\CIM_CourseDevelopment\BillOfMaterial.accdb; Persist Security Info=False"
When the line is shorter, the scroll bar disappears
Dim connStr As String = "Hello"
Dim connStr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\CIM_CourseDevelopment\BillOfMaterial.accdb; Persist Security Info=False"
Dim connStr As String = "Hello"
Imports System.Data.OleDb.OleDbConnection
Module Module1
Sub Main()
Dim connStr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\CIM_CourseDevelopment\BillOfMaterial.accdb; Persist Security Info=False"
Dim cnn As New OleDb.OleDbConnection(connStr)
Try
cnn.Open()
Dim strDesc As String = "Cardinal"
Dim command As New OleDb.OleDbCommand("INSERT INTO ItemMaster (Description) VALUES ('" + strDesc + "')", cnn)
command.ExecuteNonQuery()
cnn.Close()
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub
End Module
Field | Type |
---|---|
PartNumber | AUTOINCREMENT PRIMARY KEY |
Description | varchar(255) |
Imports System.Data.OleDb.OleDbConnection
Module Module1
Sub Main()
Dim connStr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\CIM_CourseDevelopment\BillOfMaterial.accdb; Persist Security Info=False"
Dim cnn As New OleDb.OleDbConnection(connStr)
Try
cnn.Open()
Console.WriteLine("Connection Open!")
Dim command As New OleDb.OleDbCommand("SELECT * FROM ItemMaster", cnn)
Dim reader As OleDb.OleDbDataReader = command.ExecuteReader()
While reader.Read()
Console.WriteLine("PartNumber: " + reader.GetInt32(0).ToString() + vbTab + "Description " + reader(1))
End While
cnn.Close()
Catch ex As Exception
Console.WriteLine("Can not open connection " + ex.Message)
End Try
Console.ReadLine()
End Sub
End Module
Imports System.Data.OleDb.OleDbConnection
Module Module1
Sub Main()
Dim connStr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\CIM_CourseDevelopment\BillOfMaterial.accdb; Persist Security Info=False"
Dim cnn As New OleDb.OleDbConnection(connStr)
Try
cnn.Open()
Console.WriteLine("The max part number is: " + MaxPartNumber(cnn).ToString)
cnn.Close()
Catch ex As Exception
Console.WriteLine("Can not open connection " + ex.Message)
End Try
Console.ReadLine()
End Sub
Function MaxPartNumber(cnnMax As OleDb.OleDbConnection) As Long
Dim command As New OleDb.OleDbCommand("SELECT MAX(PartNumber) FROM ItemMaster", cnnMax)
Dim reader As OleDb.OleDbDataReader = command.ExecuteReader()
reader.Read()
Return reader.GetInt32(0)
End Function
End Module
Name: | Bill Gates |
---|---|
Telephone: | 55577854 |
55577855 |
Module Module1
Sub Main()
Dim connStr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\CIM_CourseDevelopment\BillOfMaterial.accdb; Persist Security Info=False"
Dim cnn As New OleDb.OleDbConnection(connStr)
Try
cnn.Open()
Dim command As New OleDb.OleDbCommand("CREATE TABLE MyTable (ID Integer, Data varchar(50))", cnn)
command.ExecuteNonQuery()
cnn.Close()
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub
End Module
Imports System.Data.OleDb.OleDbConnection
Module Module1
Sub Main()
Dim connStr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\CIM_CourseDevelopment\BillOfMaterial.accdb; Persist Security Info=False"
Dim cnn As New OleDb.OleDbConnection(connStr)
Try
cnn.Open()
Console.WriteLine("Connection established")
Console.ReadLine()
cnn.Close()
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub
End Module
Imports System.Data.OleDb.OleDbConnection
Module Module1
Sub Main()
Dim connStr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\CIM_CourseDevelopment\BillOfMaterial.accdb; Persist Security Info=False"
Dim cnn As New OleDb.OleDbConnection(connStr)
Try
cnn.Open()
Console.WriteLine("Connection Open!")
Dim command As New OleDb.OleDbCommand("SELECT * FROM BOM WHERE Parent_PartNumber = @ParentID", cnn)
command.Parameters.AddWithValue("@ParentID", 2)
'command.Parameters.AddWithValue("@ParentID", OleDb.OleDbType.Integer).Value = 2
Dim reader As OleDb.OleDbDataReader = command.ExecuteReader()
While reader.Read()
Console.WriteLine(reader.GetInt32(0).ToString() + vbTab + reader.GetInt32(1).ToString() + vbTab + reader.GetInt32(2).ToString())
End While
cnn.Close()
Catch ex As Exception
Console.WriteLine("Can not open connection " + ex.Message)
End Try
Console.ReadLine()
End Sub
End Module
'command.Parameters.AddWithValue("@ParentID", OleDb.OleDbType.Integer).Value = 2
command.Parameters.AddWithValue("@ParentID", 2)
https://pianowithjonny.com/piano-lessons/how-to-play-beginner-cocktail-piano-in-3-steps/ https://www.pianogroove.com/jazz-piano-lessons/co...