SQL Exception ( declaring a variable )

This is a discussion on SQL Exception ( declaring a variable ) within the C# Programming forums, part of the General Programming Boards category; hi guys , i am doing a add book form of an admin panel in library automation at ASP.NET (C#).
...

SQL Exception ( declaring a variable )

hi guys , i am doing a add book form of an admin panel in library automation at ASP.NET (C#).
I have a problem at declaring a variable , when i built the project there is no error or warning but when i run and clicked the add button the error comes.
the code is below