Question: ************** Exception Text ************** System.InvalidOperationException: ExecuteReader: Connection property has not been initialized. at System.Data.SqlClient.SqlCommand.ValidateCommand(Boolean async, String method) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1

************** Exception Text ************** System.InvalidOperationException: ExecuteReader: Connection property has not been initialized. at System.Data.SqlClient.SqlCommand.ValidateCommand(Boolean async, String method) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite, String method) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at System.Data.SqlClient.SqlCommand.ExecuteReader() at WinFormsApp1.Registration.button_register_Click(Object sender, EventArgs e) in C:\Users\Asus\source epos\WinFormsApp1\Form1.cs:line 34 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)

 ************** Exception Text ************** System.InvalidOperationException: ExecuteReader: Connection property has not beeninitialized. at System.Data.SqlClient.SqlCommand.ValidateCommand(Boolean async, String method) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean

Unhandled excoption has occurrod in your application If you click Continue, the application will ignore this errar and atternpt to continue. If you click Ouit, the application will close immediately. ExeculeReater: Connection property has not beun initialized. Vin32 version: 6.0.1322 58009 CodePase: file: ///C;/ Program\%20Files/dotnet/shared/Microsoft NETCore

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!