Skip to content

Commit eabcbb4

Browse files
committed
ropc fixes in VB files
1 parent 4b60f2c commit eabcbb4

File tree

69 files changed

+410
-400
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+410
-400
lines changed

snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData OdbcCommand/VB/source.vb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ Imports System.Data.Odbc
66

77
Module Module1
88

9-
Sub Main()
10-
'Dim connectionString As String = _
11-
'"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
12-
End Sub
13-
149
' <Snippet1>
1510
Public Sub InsertRow(ByVal connectionString As String, _
1611
ByVal insertSQL As String)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net4.8</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="System.Data.Odbc" />
10+
</ItemGroup>
11+
12+
</Project>

snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData OdbcConnection.BeginTransaction/VB/source.vb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ Imports System.Data.Odbc
66

77
Module Module1
88

9-
Sub Main()
10-
Dim connectionString As String
11-
12-
connectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
13-
Call ExecuteTransaction(connectionString)
14-
End Sub
15-
169
' <Snippet1>
1710
Public Sub ExecuteTransaction(ByVal connectionString As String)
1811

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net4.8</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="System.Data.Odbc" />
10+
</ItemGroup>
11+
12+
</Project>

snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData OdbcConnection.BeginTransaction1/VB/source.vb

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ Imports System.Data.Odbc
66

77
Module Module1
88

9-
Sub Main()
10-
Dim connectionString As String
11-
12-
connectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
13-
Call ExecuteTransaction(connectionString)
14-
End Sub
15-
169
' <Snippet1>
1710
Public Sub ExecuteTransaction(ByVal connectionString As String)
1811

@@ -35,10 +28,10 @@ Module Module1
3528
command.Transaction = transaction
3629

3730
' Execute the commands.
38-
command.CommandText = _
31+
command.CommandText =
3932
"Insert into Region (RegionID, RegionDescription) VALUES (100, 'Description')"
4033
command.ExecuteNonQuery()
41-
command.CommandText = _
34+
command.CommandText =
4235
"Insert into Region (RegionID, RegionDescription) VALUES (101, 'Description')"
4336
command.ExecuteNonQuery()
4437

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net4.8</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="System.Data.Odbc" />
10+
</ItemGroup>
11+
12+
</Project>

snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData OdbcConnection.Close/VB/source.vb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22

33
Module Module1
44

5-
Sub Main()
6-
Dim connectionString As String
7-
8-
connectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
9-
Call CreateOdbcConnection(connectionString)
10-
End Sub
11-
125
' <Snippet1>
136
Private Sub CreateOdbcConnection(ByVal connectionString As String)
147
Using connection As New OdbcConnection(connectionString)
@@ -20,7 +13,7 @@ Module Module1
2013

2114
' The connection is automatically closed
2215
' at the end of the Using block.
23-
End Using
16+
End Using
2417
End Sub
2518
' </Snippet1>
2619

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net4.8</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="System.Data.Odbc" />
10+
</ItemGroup>
11+
12+
</Project>

snippets/visualbasic/VS_Snippets_ADO.NET/Classic WebData OdbcConnection/VB/source.vb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
Module Module1
44

5-
Sub Main()
6-
Dim connectionString As String
7-
connectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Samples\Northwind.mdb"
8-
Call InsertRow(connectionString)
9-
End Sub
10-
115
' <Snippet1>
126
Private Sub InsertRow(ByVal connectionString As String)
137

@@ -20,10 +14,10 @@ Module Module1
2014
connection.Open()
2115
command.ExecuteNonQuery()
2216

23-
' The connection is automatically closed at
17+
' The connection is automatically closed at
2418
' the end of the Using block.
2519
End Using
2620
End Sub
2721
' </Snippet1>
2822

29-
End Module
23+
End Module
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net4.8</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="System.Data.Odbc" />
10+
</ItemGroup>
11+
12+
</Project>

0 commit comments

Comments
 (0)