Put a breakpoint in the con.Open() line and check the connection string property of connection object. Sometimes the connection string itself referring a wrong location. As the other user said, ADO.NET will throw error if the execute fails. So, you must me referring a wrong database.
Zafar Ali Khan 1900 wrote:
com.CommandText="insert into <DATABASENAME>.dbo.tbl([Name],FName,Address) values('Angelina','Carlos','sedny')";
replace the <DATABASENAME> with your database name (Full qualifier name). This would help if two or more databases has table in same name and your connection string does not have any Initial Catalog mentioned (default is master database). Better you post your connection string also
Castle Rider
What if I freeze??? Don't forget to breath...
My: Website | Yahoo Group | Blog Spot