A
Angelina
Hi,
I need help on trying to figure out the best way to solve
this problem.
What i have is a combobox that allows the user to select
a room they want. A stored procedure is run once a room
is selected that should return a boolean value stating
wether the room supplies catering. Based on this boolean
value a groupbox is displayed. i.e if the value is false,
the groupbox should be hidden. The groupbox should only
be displayed if the value is false.
How do i go about doing this?
This is my sproc..
SELECT Catering
FROM dbo.Rooms_avail
WHERE (Room_name = @RoomName)
This is my code so far...
Dim Cn As New SqlConnection("initial
catalog=TestCaraDBmsde;integrated security=SSPI;persist
security info=False;workstation id=USER;packet size=4096")
Dim cmdCatering As New SqlCommand("SPSelCatering", Cn)
cmdCatering.CommandType = CommandType.StoredProcedure
'declare the parameters
cmdCatering.Parameters.Add("@RoomName", SqlDbType.Char,
50)
'now set the values
cmdCatering.Parameters("@RoomName").Value =
CBoxRoomNames.SelectedItem
can anyone please help me finish this up?
thx in advance
I need help on trying to figure out the best way to solve
this problem.
What i have is a combobox that allows the user to select
a room they want. A stored procedure is run once a room
is selected that should return a boolean value stating
wether the room supplies catering. Based on this boolean
value a groupbox is displayed. i.e if the value is false,
the groupbox should be hidden. The groupbox should only
be displayed if the value is false.
How do i go about doing this?
This is my sproc..
SELECT Catering
FROM dbo.Rooms_avail
WHERE (Room_name = @RoomName)
This is my code so far...
Dim Cn As New SqlConnection("initial
catalog=TestCaraDBmsde;integrated security=SSPI;persist
security info=False;workstation id=USER;packet size=4096")
Dim cmdCatering As New SqlCommand("SPSelCatering", Cn)
cmdCatering.CommandType = CommandType.StoredProcedure
'declare the parameters
cmdCatering.Parameters.Add("@RoomName", SqlDbType.Char,
50)
'now set the values
cmdCatering.Parameters("@RoomName").Value =
CBoxRoomNames.SelectedItem
can anyone please help me finish this up?
thx in advance