ASP.NET 1.x and 2.0 Application DesignApplication design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
I am inserting values from a form but unable to get them added to database.I am working on .net2.0 and using sql server.getting Exception: System.InvalidOperationException: Fill: SelectCommand.Connection property has not been initialized.
I am using this function
private void bindData()
{
dbcon objDbCon = new dbcon();
string sql;
SqlCommand cmd = new SqlCommand("select * from products");
Well, there is nothing we could help if you post it this raw... Let us know exactly how you are inserting data, whether you are receiving any error etc etc.