Imports System.Data
Imports System.Data.SqlClient
Public Class Form1
Inherits System.Windows.Forms.Form
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
MyBase.Dispose(disposing)
End Sub
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Private Sub InitializeComponent()
Me.MainMenu1 = New System.Windows.Forms.MainMenu
Me.Button1 = New System.Windows.Forms.Button
Me.TextBox1 = New System.Windows.Forms.TextBox
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(104, 160)
Me.Button1.Text = "Button1"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(8, 16)
Me.TextBox1.Size = New System.Drawing.Size(280, 22)
Me.TextBox1.Text = "TextBox1"
'
'Form1
'
Me.ClientSize = New System.Drawing.Size(314, 209)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Button1)
Me.Menu = Me.MainMenu1
Me.Text = "Form1"
End Sub
#End Region
Dim myConn As Data.SqlClient.SqlConnection
Dim myAdapter As SqlClient.SqlDataAdapter
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = "Hello World"
myConn = New SqlClient.SqlConnection
myConn.ConnectionString = "data source=192.168.0.252;initial catalog=MohawkSpr;persist security info=False;user id=mohawkspr;password=1;workstation id=ica5;packet size=4096"
Try
myConn.Open() '<-MissingMethodException
MsgBox("Open")
myConn.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Class