|
-
Nov 20th, 2006, 09:07 AM
#1
Thread Starter
New Member
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()
-
Nov 20th, 2006, 09:12 AM
#2
Thread Starter
New Member
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")
-
Nov 20th, 2006, 09:18 AM
#3
Thread Starter
New Member
Re: Some easy questions
ok all my problem solved, thanks guy for taking a look
-
Nov 20th, 2006, 10:12 AM
#4
Fanatic Member
Re: Some easy questions
Please mark your post resolved by using the Thread Tools near the top of the post. Thank you.
Warren Ayen
Senior C# Developer
DLS Software Studios ( http://www.dlssoftwarestudios.com/)
I use Microsoft Visual Studio 2005, 2008, working with Visual Basic and Visual C#
Hey! If you like my post, or I solve your issue, please Rate Me!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|