Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Invalid Arguement error

$
0
0

please find my below code and it show invalid arguement error but the same code able to run in other system

dont know why. please let know

protected void Page_Load(object sender, EventArgs e)
        {

            Label1.Visible = false;

            SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\Program files\Project\WebApplication3\WebApplication3\App_Data\Database1.mdf;Integrated Security=True;User Instance=True");
            con.Open();
            string query = "select * from Table3 ";
            SqlDataAdapter da = new SqlDataAdapter(query, con);
            DataSet ds = new DataSet();
            da.Fill(ds);
            GridView2.DataSource = ds;
            GridView2.DataBind();

        }


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>