M
Mark
Hi
I want to return the ID of a table based on a select
I've not tested the following code, does it look ok?
<code>
Dim Con As New SqlClient.SqlConnection
Con.ConnectionString =
ConfigurationSettings.AppSettings("ConnString")
Con.Open()
'generate select statement
Dim Cmd As New SqlClient.SqlCommand
Cmd.Connection = Con
Cmd.CommandType = CommandType.Text
Cmd.CommandText = "Select * From BOOKING_MASTER
WHERE BOOKING_NUMBER = @Booking_Number"
Cmd.Parameters("@Booking_Number") = 1
'return the Booking_Master.bookingID to a variable here
</Code>
can any one help with returning the ID and telling me if
the code looks ok?
Thanks
Mark
I want to return the ID of a table based on a select
I've not tested the following code, does it look ok?
<code>
Dim Con As New SqlClient.SqlConnection
Con.ConnectionString =
ConfigurationSettings.AppSettings("ConnString")
Con.Open()
'generate select statement
Dim Cmd As New SqlClient.SqlCommand
Cmd.Connection = Con
Cmd.CommandType = CommandType.Text
Cmd.CommandText = "Select * From BOOKING_MASTER
WHERE BOOKING_NUMBER = @Booking_Number"
Cmd.Parameters("@Booking_Number") = 1
'return the Booking_Master.bookingID to a variable here
</Code>
can any one help with returning the ID and telling me if
the code looks ok?
Thanks
Mark