Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ Imports System.Data.Odbc

Module Module1

Sub Main()
'Dim connectionString As String = _
'"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
End Sub

' <Snippet1>
Public Sub InsertRow(ByVal connectionString As String, _
ByVal insertSQL As String)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ Imports System.Data.Odbc

Module Module1

Sub Main()
Dim connectionString As String

connectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
Call ExecuteTransaction(connectionString)
End Sub

' <Snippet1>
Public Sub ExecuteTransaction(ByVal connectionString As String)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ Imports System.Data.Odbc

Module Module1

Sub Main()
Dim connectionString As String

connectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
Call ExecuteTransaction(connectionString)
End Sub

' <Snippet1>
Public Sub ExecuteTransaction(ByVal connectionString As String)

Expand All @@ -35,10 +28,10 @@ Module Module1
command.Transaction = transaction

' Execute the commands.
command.CommandText = _
command.CommandText =
"Insert into Region (RegionID, RegionDescription) VALUES (100, 'Description')"
command.ExecuteNonQuery()
command.CommandText = _
command.CommandText =
"Insert into Region (RegionID, RegionDescription) VALUES (101, 'Description')"
command.ExecuteNonQuery()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@

Module Module1

Sub Main()
Dim connectionString As String

connectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
Call CreateOdbcConnection(connectionString)
End Sub

' <Snippet1>
Private Sub CreateOdbcConnection(ByVal connectionString As String)
Using connection As New OdbcConnection(connectionString)
Expand All @@ -20,7 +13,7 @@ Module Module1

' The connection is automatically closed
' at the end of the Using block.
End Using
End Using
End Sub
' </Snippet1>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

Module Module1

Sub Main()
Dim connectionString As String
connectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
Call InsertRow(connectionString)
End Sub

' <Snippet1>
Private Sub InsertRow(ByVal connectionString As String)

Expand All @@ -20,10 +14,10 @@ Module Module1
connection.Open()
command.ExecuteNonQuery()

' The connection is automatically closed at
' The connection is automatically closed at
' the end of the Using block.
End Using
End Sub
' </Snippet1>

End Module
End Module
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ Imports System.Data.Odbc

Module Module1

Sub Main()
'Dim connectionString As String = _
'"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
'dim x as String="DRIVER={SQL Server};SERVER=MyServer;Trusted_connection=yes;DATABASE=Northwind;"
End Sub

' <Snippet1>
Public Function CreateDataAdapter( _
ByVal connection As OdbcConnection) As OdbcDataAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ Imports System.Data.Odbc

Module Module1

Sub Main()
'Dim connectionString As String = _
'"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
'dim x as String="DRIVER={SQL Server};SERVER=MyServer;Trusted_connection=yes;DATABASE=Northwind;"
End Sub

' <Snippet1>
Public Function CreateDataAdapter( _
ByVal connection As OdbcConnection) As OdbcDataAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ Imports System.Data.Odbc

Module Module1

Sub Main()
'Dim connectionString As String = _
'"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
'dim x as String="DRIVER={SQL Server};SERVER=MyServer;Trusted_connection=yes;DATABASE=Northwind;"
End Sub

' <Snippet1>
Public Function CreateDataAdapter( _
ByVal connection As OdbcConnection) As OdbcDataAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ Imports System.Data.Odbc

Module Module1

Sub Main()
'Dim connectionString As String = _
'"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
'dim x as String="DRIVER={SQL Server};SERVER=MyServer;Trusted_connection=yes;DATABASE=Northwind;"
End Sub

' <Snippet1>
Public Function CreateDataAdapter( _
ByVal connection As OdbcConnection) As OdbcDataAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ Imports System.Data.Odbc

Module Module1

Sub Main()
'Dim connectionString As String = _
'"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
'dim x as String="DRIVER={SQL Server};SERVER=MyServer;Trusted_connection=yes;DATABASE=Northwind;"
End Sub

' <Snippet1>
Public Function CreateDataAdapter( _
ByVal connection As OdbcConnection) As OdbcDataAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ Imports System.Data.Odbc

Module Module1

Sub Main()
'Dim connectionString As String = _
'"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
'dim x as String="DRIVER={SQL Server};SERVER=MyServer;Trusted_connection=yes;DATABASE=Northwind;"
End Sub

' <Snippet1>
Public Function CreateDataAdapter( _
ByVal connection As OdbcConnection) As OdbcDataAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ Imports System.Data.Odbc

Module Module1

Sub Main()
'Dim connectionString As String = _
'"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
'dim x as String="DRIVER={SQL Server};SERVER=MyServer;Trusted_connection=yes;DATABASE=Northwind;"
End Sub

' <Snippet1>
Public Function CreateDataAdapter( _
ByVal connection As OdbcConnection) As OdbcDataAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ Imports System.Data.Odbc

Module Module1

Sub Main()
'Dim connectionString As String = _
'"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
'dim x as String="DRIVER={SQL Server};SERVER=MyServer;Trusted_connection=yes;DATABASE=Northwind;"
End Sub

' <Snippet1>
Public Function CreateDataAdapter( _
ByVal connection As OdbcConnection) As OdbcDataAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net4.8</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Odbc" />
</ItemGroup>

</Project>
Loading