Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with null value
Message
 
 
To
09/06/2014 15:32:56
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01601518
Message ID:
01601523
Views:
25
Can you show what do you mean? I can not use inline IIF but I believe with that new code it should work. I'm going to test my new code in a few minutes.

>Can you just pass null without casting to Int64?
>
>>I am re-writing my code now this way:
>>
>>
>>  SqlParameter gstPassNo = insertCommand.Parameters.Add("@gstPassNo", SqlDbType.Decimal, 17);
>>                if (this.passTable == PassTable.Gst_Pass)
>>                    gstPassNo.Value =   passNo;
>>                else 
>>                    gstPassNo.Value = DBNull.Value;
>>
>>
>>after finding this link
>>
>>http://stackoverflow.com/questions/4555935/how-to-assign-null-to-a-sqlparameter
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform