Adding data from local SQL
Hi there,
Could some one please help me to attach data from SQl server? my code goes like this:
private void button4_Click(object sender, EventArgs e)
{
SqlDataAdapter adp = new SqlDataAdapter
(the name of the sheet that I like to attach is Main$)
So, when the button 4 is executed, I want the Main$ is to appear on the datagrid... Thanks in advance.
Re: Adding data from local SQL
There are heaps of data access examples around. I suggest you read all about ADO.NET here to save you coming back with questions again and again. Note that when you click the "View Source" links it will show you VB.NET code, but there is a link to C# code at the top of that page. You may also like to download the C# 2003 101 samples from my signature, which will have data access examples included.