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
 

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

Top