Wel after trying a lot. I do this:
Code: Select all
Private Sub Login_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim dataReader As PgSqlDataReader = Nothing
Me.PgSqlConnection1.Open()
dataReader = Me.PgSqlCommand1.ExecuteReader
If (dataReader.FieldCount > 0) Then
dataReader.Read()
Me.TextBoxUsername.Text = dataReader.GetValue(0)
Else
Me.TextBoxUsername.Text = "NO DATA"
End If
dataReader.Close()
End Sub
When i press the play button under visual studio i get the app runing and shows the data in the desired texbox, great.
BUT in the lower part of the screen (inmediate window of visual studio 2005) i get some messages like:
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.PostgreSql.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in CoreLab.Data.dll
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
Why this messages?