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

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -