Hy rperreta,
Try doing this :
1) I don't think that u need to declare reader,connection,
command etc.. objects like this
"Dim myDataReader As System.Data.SqlClient.SqlDataReader"
since u've already imported the necessary files.
they can b replaced by..
"dim myDataReader as SqlDataReader" n wen u use them u can
assign them memory by giving "new" like u've done in:
"myCommand = New SqlCommand(strSQL, myConnection)"
2) reorder ur statements:
- myConnection = New SqlConnection("server=216.254.122.15; uid=sa; pwd=*****; database=filmgigs_db;")
- myConnection.Open()
- strSQL = "SELECT * FROM genre where genreid=1"
- myCommand = New SqlCommand(strSQL, myConnection)
- myDataReader = myCommand.ExecuteReader()
- TextBox1.Text = myDataReader.Item("genretype")
Hope this helps.. :)
Ciao..
**************************************************
It bcums FATAL wen my brain puts my eyes on Call-Waiting ! >|B-)
|