dear All,
I wants to show records on in the table on the asp page from sql server table i must say that i have 25 field or columns and 100 record in my database table and i wants to select only some columns and display all these columns records in the form of a table on the asp page
i all ready created command for the same
plz let me know, with the simple example , how i can do this
thanks
regards
Yogesh
additional information copied from comment below
Dim ss As String = "select Enquiry_No, Enquiry_date, Name, DOB, Father_Name, Mother_Name, Parents_Contact, Center_Name, Course, Class, Subject FROM([EIMS].[dbo].[Enquiry] "
Try
con.Open()
Dim da As New SqlDataAdapter()
Dim ds As New DataSet
da = New SqlDataAdapter(ss, con)
da.Fill(ds, "aa")
Dim tblviewEnq As DataTable
tblviewEnq = ds.Tables(0)
Dim drCurrent As DataRow
For Each drCurrent In tblviewEnq.Rows
Console.WriteLine("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10}",
drCurrent("Enq.NO").ToString,
drCurrent("Enquiry Date").ToString,
drCurrent("Name").ToString,
drCurrent("DOB").ToString,
drCurrent("Father's Name").ToString,
drCurrent("Mother's Name").ToString,
drCurrent("Parent's Contact").ToString,
drCurrent("Center").ToString,
drCurrent("Course").ToString,
drCurrent("Class").ToString,
drCurrent("Subject").ToString)
Next
Console.ReadLine()
Catch ex As Exception
lblerror.ForeColor = Drawing.Color.Red
lblerror.Text = ex.Message.ToString
End Try