I’m thinking that your output parameter is coming back with a DBNull value. Add a check for that like this
var outputParam = dataAccCom.GetParameterValue(IDbCmd, "op_Id");
if(!(outputParam is DBNull))
DataTO.Id = Convert.ToInt64(outputParam);
More Related Contents:
- Determine if a number can be made with prepicked numbers and times
- Get URL parameters from a string in .NET
- Path.Combine for URLs?
- How to get client date and time in ASP.NET?
- How to call a VBScript file in a C# application?
- How to use non-thread-safe async/await APIs and patterns with ASP.NET Web API?
- Json.NET serialize object with root name
- When using Trusted_Connection=true and SQL Server authentication, will this affect performance?
- Absolute path back to web-relative path
- DropdownList DataSource
- Passing data to Master Page in ASP.NET MVC
- Pattern for calling WCF service using async/await
- Get text/value from textbox after value/text changed server side
- how to convert NameValueCollection to JSON string?
- How to set attributes values using reflection
- How can I remove item from querystring in asp.net using c#?
- thread with multiple parameters
- When is using the C# ref keyword ever a good idea?
- How do you bind an Enum to a DropDownList control in ASP.NET?
- No authenticationScheme was specified, and there was no DefaultChallengeScheme found with default authentification and custom authorization
- Can I have a variable number of generic parameters?
- How can I handle forms authentication timeout exceptions in ASP.NET?
- MEF with MVC 4 or 5 – Pluggable Architecture (2014)
- How do I force full post-back from a button within an UpdatePanel?
- Multiples Table in DataReader
- ThreadStaticAttribute in ASP.NET
- Unable to find the requested .Net Framework Data Provider. It may not be installed
- Can’t find how to use HttpContent
- Get first element from a dictionary
- How do I get a directory size (files in the directory) in C#?