asp.net problem

G

Guest

I have used the link below and try to run the example
"http://samples.gotdotnet.com/quicks...a/datagrid1.src&file=CS\datagrid1.aspx&font=3"
but it giving me the error i dont have any idea whats wrong seem to be olrite
but still got error my sqlserver is on ip 10.0.0.2 and using windows athun
instead of sql server
here is the connection string
SqlConnection myConnection = new
SqlConnection("server=10.0.0.2;database=MyDatabase;Trusted_Connection=yes");
SqlDataAdapter myCommand = new SqlDataAdapter("select * from Authors",
myConnection);

DataSet ds = new DataSet();
myCommand.Fill(ds, "Authors");

MyDataGrid.DataSource=ds.Tables["Authors"].DefaultView;
MyDataGrid.DataBind();
any one has any idea whats wrong thanks
 
J

Juan T. Llibre

Please don't post the same question with different subjects.

Already answered in your other thread...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top