After running the above code, I check the variable query and found an exception
The underlying provider failed on Open.
I've checked:
Connection between server and computer is normal
I can login to the database with username and password
I have checked the security settings in database (SQL Server) that permission has been granted .
I can able to 'Insert' records but not 'Update'
Why does this exception happen? I'm using .net 4.5
Member
10 Points
27 Posts
The underlying provider failed on Commit
Apr 14, 2015 06:38 AM|sugankris|LINK
Hello,
I am having a problem with commit.
Here is the code where program stuck.
After running the above code, I check the variable query and found an exception
The underlying provider failed on Open.
I've checked:
Connection between server and computer is normal
I can login to the database with username and password
I have checked the security settings in database (SQL Server) that permission has been granted .
I can able to 'Insert' records but not 'Update'
Why does this exception happen? I'm using .net 4.5
Thanks
All-Star
43250 Points
14977 Posts
Re: The underlying provider failed on Commit
Apr 14, 2015 07:52 AM|PatriceSc|LINK
Hi,
You should have an inner exception with what happened... nex.GetBaseException().Message might give a more accurate picture...
Member
10 Points
27 Posts
Re: The underlying provider failed on Commit
Apr 14, 2015 08:24 AM|sugankris|LINK
Thanks for the Reply, the innerException is:
"Value cannot be null.\r\nParameter name: connection"