-
Some easy questions
hi,
my codes is
Dim connection as New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
Dim command as New SqlCommand("Select * from teacher where SNo = @SNo',connection)
command.Parameters.Add("@SNo",lol.text)
Dim dataAdapter as New SqlDataAdapter(command)
Dim result as New dataSet
connection.open()
dataAdapter.Fill(result,"teacher")
connection.close()
my error is
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where ir originated from the code.
Exception Detail : System.InvalidOperationException. The connectionString property has not been initialized..
Source error
Line 60 connection.Open()
-
Re: Some easy questions
sorry I solved that error already :(
however I faced another problem
Exception Detail: System Index Out of Range Exception. There is no row at position 0
lb1.Text = result.Tables("Teacher").Rows(0).Item("SAddress")
-
Re: Some easy questions
ok all my problem solved, thanks guy for taking a look :)
-
Re: Some easy questions
Please mark your post resolved by using the Thread Tools near the top of the post. Thank you.