Want to fetch more than 2 id from table in asp.net using sql server -
This field does not give the name of the column column value
cmd = Select new SqlCommand ("ShowId, ScreenId, MovieId, MenuId, Tbl_Booking WHERE BookingId =" + 7 + "'', con); SqlDataAdapter da = New SqlDataAdapter (cmd); Dataset DS = New Dataset (); da.Fill ( DS); String Showide = DTibules [0] .column ["Shoid"] .Toastring (); String classID = DTTables [0] .column ["ClassId"] .Toastring (); String screenID = DTTables [0]. Column ["scroll String MovieID = Dettibles [0]. Columns ["Bookmenuide"] .toasting (); Code>
You are not receiving the value from the rows, instead the columns change your code in this way
ds.Tables [0] .owsows [0] ["ShowId"]. ToString (); If you have only one line and If multiple uses are foreach loop.
Comments
Post a Comment