Convert null to int sql server 2005




















Find centralized, trusted content and collaborate around the technologies you use most. Connect and share knowledge within a single location that is structured and easy to search. Here's the query :.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Search related threads. Remove From My Forums. Answered by:. Archived Forums. Sign in to vote. ExecuteReader ; while reader. ToString ; AttendanceDataSource. Not sure if this helps, are all the values causing the error to occur?

What does your table schema look like? I thinks the problem is that my Table Defenition has an Int for that column, and my 0ToNull conversion function returns an "Int? Then I get this error: "Cannot implicitly convert type 'int? An explicit conversion exists are you missing a cast? Stores the conversion of value in the database, converted with the 0ToNull convertor.

I've changed the properties of the columns in the designer, and the exceptions are gone. All works perfect now. Maybe you can give me an answer on my following question: Is it possible to update the data context to the actual database situation? So, when I delete a column in a table, the data context is also updated?

Thank you. Oh good. Is this possible? Sean Lange. Need to split a string? That did it. Thank you Jason and Sean for your help. I appreciate it very much. Orlando Colamatteo. There are no special teachers of virtue, because virtue is taught by the whole community.

You must be logged in to reply to this topic. Login to reply. July 9, at pm



0コメント

  • 1000 / 1000