none
How to map SQL Server data types to DCIL?

    Question

  • I want to map the data types available in SQL Server 2012 into DCIL.

    I'm still learning about DCIL, so as a start, I'd like to make a two column list that shows all of the SQL Server 2012 data types in the left hand column and the equivalent "maps to" DCIL data type in the right hand column.

    I already have the list of SQL Server data types but I have not been able to find out much about the data types that are available in DCIL.

    Is there a DCIL data type reference somewhere?

       

    Ken Evans

    • Moved by Bob Beauchemin Sunday, September 13, 2015 8:18 PM Moved to CLR-based forum to improve results
    • Moved by Fred Bao Tuesday, September 15, 2015 7:18 AM
    Sunday, September 13, 2015 10:29 AM

Answers

  • I'd try asking there. Your question may have been in the correct forum originally but I think the problem is no one has a clue. These forums are for the most part peer level support. Another option is with an MSDN sub you'll have two to four support incidents you can use.

    https://msdn.microsoft.com/en-us/library/bb266240.aspx?f=255&MSPPError=-2147217396

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Wednesday, September 16, 2015 2:03 PM
    Moderator

All replies

  • Hi Ken,

    All I could find about DCIL were a few research papers. The papers mention interoperability between DCIL and C#, so you might try posting on a MSDN CLR forum (or I could move it there for you), or possibly contacting the papers' authors. Here's a mapping of CLR and SQL Server data types https://technet.microsoft.com/en-us/library/ms131092(v=sql.110).aspx Once you have a list a DCIL types, this could be a useful starting point.

    Cheers, Bob

    Sunday, September 13, 2015 7:06 PM
  • Hi Bob,

    I asked this question because I'm trying to understand how an open source software package works with a view to extending it.

    For example, below, I have posted a snippet from some code that converts SQL Server datatypes into DCIL data types. The code was written before SQL Server 2008 was announced so the list of datatypes in the "case" sections needs to be extended to handle the new datatypes in later versions of SQL Server.

    It is from this and similar code that I have inferred the existence of "DCIL datatypes".

    So that's why I'm trying to make my two column list.

    I'm at the edge of my knowledge so I would appreciate it if you could move the thread to a "more appropriate" forum.

    Thanks

    Ken

    private DcilDataType.DCILType ConvertSQLServerDataType(string dataType)
            {
                dataType = dataType.ToLowerInvariant();
                switch (dataType)
                {
                    case "nvarchar":
                    case "varchar":
                    case "ntext":
                    case "text":
                        return DcilDataType.DCILType.CharacterVarying;
                    case "char":
                    case "nchar":
                        return DcilDataType.DCILType.Character;



    Ken Evans

    Sunday, September 13, 2015 7:42 PM
  • Hi Ken,

    This  forum is discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework. But based on your code, I think you should consider your compatibility。For example, here are all SQL Server Data Type Mappings. If you choose int32, it stands for 4 bits. so you should match with 4bits.

    Best regards,

    Kritsin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Kristin Xie Monday, September 14, 2015 8:03 AM
    Monday, September 14, 2015 8:03 AM
  • Hi Kritsin,

    Thanks for your response and for the interesting link.

    My original post was in the SQL Server forum. It was redirected here by Bob Beauchemin.

    If this is not the right forum, then please can you or someone else suggest a forum where I can get some answers about data types in DCIL?

    Thanks

    Ken


    Ken Evans

    Monday, September 14, 2015 10:34 AM
  • Hi Kritsin,

    Thanks for your response and for the interesting link.

    My original post was in the SQL Server forum. It was redirected here by Bob Beauchemin.

    If this is not the right forum, then please can you or someone else suggest a forum where I can get some answers about data types in DCIL?

    Thanks

    Ken


    Ken Evans

    Hi Ken,

    Thank you for visiting the MSDN forum. I’m afraid that it is not the correct forum about this issue,  I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum. Thanks for your understanding.

    Best regards,

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, September 15, 2015 7:16 AM
  • Something here may help.

    http://research.microsoft.com/en-us/projects/fine/

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    • Proposed as answer by Mike Laughlin Wednesday, September 16, 2015 2:56 AM
    • Unproposed as answer by Ken Evans Wednesday, September 16, 2015 12:57 PM
    Wednesday, September 16, 2015 1:05 AM
    Moderator
  • Hi Dave,

    Thanks for your response.
    However, the link that you provided was proposed by Bob three days ago so it does nopt add anything to this thread.

    What I'm looking for is a list of the DCIL datatypes and their definitions - which is not mentioned in your suggested link.


    Ken Evans

    Wednesday, September 16, 2015 1:02 PM
  • I'd ask over here.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral%2Cvcgeneral&filter=alltypes&sort=lastpostdesc

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Wednesday, September 16, 2015 1:08 PM
    Moderator
  • Hi Dave,

    A search in that forum for "DCIL" got zero results.

    I'd like to minimise clutter so please let me know wether you are suggesting that this therad be moved or that I ask a new question in that forum.

    Thanks


    Ken Evans

    Wednesday, September 16, 2015 1:21 PM
  • I'd try asking there. Your question may have been in the correct forum originally but I think the problem is no one has a clue. These forums are for the most part peer level support. Another option is with an MSDN sub you'll have two to four support incidents you can use.

    https://msdn.microsoft.com/en-us/library/bb266240.aspx?f=255&MSPPError=-2147217396

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Wednesday, September 16, 2015 2:03 PM
    Moderator