Skip to content

Commit

Permalink
ropc fixes in VB files
Browse files Browse the repository at this point in the history
  • Loading branch information
gewarren committed Oct 1, 2024
1 parent 4b60f2c commit eabcbb4
Show file tree
Hide file tree
Showing 69 changed files with 410 additions and 400 deletions.
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>Exe</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>Exe</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>Exe</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>Exe</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>Exe</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>Exe</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>Exe</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>Exe</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>Exe</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>Exe</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>Exe</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>Exe</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>Exe</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 Function GetDataSetFromAdapter( _
ByVal dataSet As DataSet, ByVal connectionString As String, _
Expand Down
Loading

0 comments on commit eabcbb4

Please sign in to comment.