This is a migrated thread and some comments may be shown as answers.

Nullable Types in Sprocs Aren't Nullable After Rev Engineering

1 Answer 32 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael Luna
Top achievements
Rank 1
Michael Luna asked on 25 Sep 2009, 11:51 PM
I have several stored procedures whose parameters have " = NULL" or " = 0" or some such thing after them in the sproc declaration.  Yet when OpenAccess reverse-engineers the stored procedures into a calling method, it does not use nullable types to represent those parameters (such as short? or int?).  It instead uses non-nullable types (e.g. short or int) and then I'm faced with having to go through and correct them all, or set and cast them in the caller, etc.  Why can't OpenAccess see that they're nullable and represent them accurately?

There also seems to be an issue with mapping the CHAR(1) data type, which OA maps as "string" and again I have to manually fix it or cast it.

1 Answer, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 30 Sep 2009, 02:49 PM
Hello Michael Luna,

 Which backend are you using? I did refer to some previous posts from you and noticed MS SQL Server.
The Reverse mapping wizard does map nullable procedure parameters to .NET nullable types.
Also a CHAR(1) data type is mapped to a 'char' type.

Can you provide us with the procedure declaration and the backend?

Regards,
Ady
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Databases and Data Types
Asked by
Michael Luna
Top achievements
Rank 1
Answers by
Ady
Telerik team
Share this question
or