T
Tonya
hi,
I am trying to setup a datagrid that pulls values from a
database but i keep getting an error message when i run
the application. Can anyone help me??
The application stops at the line:
da2.fill(ds2)
i keep getting the following error message:
An unhandled exception of
type 'System.Data.SqlClient.SqlException' occurred in
system.data.dll
here is my code leading up to this:
da2 = New SqlDataAdapter("SELECT Meal_Desc, 0 as Quantity
FROM Equipment_Details", Cn)
ds2 = New DataSet("MealBooking")
da2.Fill(ds2)
DGridMealBooking.DataSource = ds2.Tables(0)
this code is in the form_load event.
I have another datagrid being filled just above this one
shown above.
I have instantiated outside of the form load as:
Private da2 as SqlDataAdapter
Private ds2 as dataset
Can anyone help? i have no idea what i have done wrong!!
thx
I am trying to setup a datagrid that pulls values from a
database but i keep getting an error message when i run
the application. Can anyone help me??
The application stops at the line:
da2.fill(ds2)
i keep getting the following error message:
An unhandled exception of
type 'System.Data.SqlClient.SqlException' occurred in
system.data.dll
here is my code leading up to this:
da2 = New SqlDataAdapter("SELECT Meal_Desc, 0 as Quantity
FROM Equipment_Details", Cn)
ds2 = New DataSet("MealBooking")
da2.Fill(ds2)
DGridMealBooking.DataSource = ds2.Tables(0)
this code is in the form_load event.
I have another datagrid being filled just above this one
shown above.
I have instantiated outside of the form load as:
Private da2 as SqlDataAdapter
Private ds2 as dataset
Can anyone help? i have no idea what i have done wrong!!
thx