i created one ASP.Net project using SQL Server 2005 .I successfully inserted .But i dont know to view the table.Please tell me
A:
Well this is a pretty broad question, but to get data into a datatable you could do something like:
DataTable dt = new DataTable();
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["SQLConnection"].ConnectionString);
SqlCommand cmd = new SqlCommand("Retrieve", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@ID", SqlDbType.Int).Value = ID;
SqlDataAdapter sqldata = new SqlDataAdapter(cmd);
con.Open();
sqldata.Fill(dt);
con.Close();
Dustin Laine
2010-03-09 07:24:46
soory i think i not explain the question detailed.MY question is I wwant to see the table in the database
2010-03-09 07:46:28
The have a look at what @hallie said in a comment to your answer. You can view the table using Microsoft SQL Server Management Studio.
Dustin Laine
2010-03-09 08:04:46
+2
A:
A beginner instrudciton into SQL server seems in order - you seem to stumble around not knowing anything about hwat you really deal with.
I suggest heading over to ASP.NET (http://www.asp.net/) and read the indroduction documentation, as well as have some look at the sample code and the beginner forum.
TomTom
2010-03-09 07:25:23