0

see my code pls

Imports System.Data.SqlClient
Inherits System.Windows.Forms.Form
Dim myConnection As SqlConnection
Dim myCommand As SqlCommand
Dim dr As SqlDataReader

' the database we'll be connecting to
myConnection= New SqlConnection("Data Source=MSALAMEEN;Initial Catalog=Biometric;Integrated Security=True")

I am having declaration in the last line above(myConnection)

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by Stevoni
0

"Inherits System.Windows.Forms.Form" did you intend inherits or did you mean "import"? Also use System.Windows.Forms and dont repeat the last class name.

0

"Inherits System.Windows.Forms.Form" did you intend inherits or did you mean "import"? Also use System.Windows.Forms and dont repeat the last class name.

I think it's part of a form where he discarded the class name but left the inheritance modifier. :confused:

To the OP, do you get the same error when you initiliaze without the connection string? I.e.: myConnection= New SqlConnection()

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.