none
Embedded ODBC API for direct MS SQL Connection RRS feed

  • Question

  • Dear All, 

    I am an embedded electronic engineer, at AMRC Sheffield university. 

    I am researching how to directly connect to an MS SQL database with ODBC using an embedded platform (national instrument cRIO 9022 and or sbRIO, which run vxworks). The application requires remote DB connection from and embedded platform which captures real-time data, hence the need for an embedded platform for data determinism, the DB connection is not require to be in RT. Currently the recommend strategy from national instruments is to connect to a MS SQL database using a windows PC and ODBC. 

    I understand that Microsoft does not publish the details of the back end communication directly to their DB so creating an custom/equivalent driver for MS SQL would be very difficult. I was just wondering if there was an advice on ODBC, and if it was possible to create a embedded API/driver to directly communicate with the MS SQL DB. If not i will look at the recommend path by national instruments.  

    Many Thanks to anyone who takes the time to answer/respond to my question.

    Tim


    • Edited by tshelley Thursday, February 19, 2015 8:44 AM
    Thursday, February 19, 2015 8:44 AM

Answers

  • Hello Tim,

    Thank you for you question. I'll first admit total ignorance of the VxWorks platform beyond 5 minutes of looking at its Wikipedia page, so I hope you'll forgive any obviously unhelpful suggestions.

    I see that the platform supports GCC, so you might be able to take advantage of some existing libraries, possibly with some modifications. I don't have any direct experience with it and can't make a recommendation, but the FreeTDS project might be a place to start.

    We have extensive documentation of the ODBC API and we fully document the underlying TDS protocol that is used for communication with SQL Server. Following these two references, it is possible (though certainly not trivial) to create an ODBC driver from the ground up.

    Hopefully these resources give you an idea of what will be possible. Let me know if you have additional questions.

    Best regards,
    Matt Weber | Microsoft Open Specifications Team

    Thursday, February 19, 2015 6:32 PM

All replies

  • Hello Tim,

    Thank you for you question. I'll first admit total ignorance of the VxWorks platform beyond 5 minutes of looking at its Wikipedia page, so I hope you'll forgive any obviously unhelpful suggestions.

    I see that the platform supports GCC, so you might be able to take advantage of some existing libraries, possibly with some modifications. I don't have any direct experience with it and can't make a recommendation, but the FreeTDS project might be a place to start.

    We have extensive documentation of the ODBC API and we fully document the underlying TDS protocol that is used for communication with SQL Server. Following these two references, it is possible (though certainly not trivial) to create an ODBC driver from the ground up.

    Hopefully these resources give you an idea of what will be possible. Let me know if you have additional questions.

    Best regards,
    Matt Weber | Microsoft Open Specifications Team

    Thursday, February 19, 2015 6:32 PM
  • Hello Matt,

    Thank you for the reply, I will have a look into the links. For the time being, i have decided to use mySQL as my database, as there are already APIs to communicate with the database. In the future i may looking in to creating a ms SQL ODBC driver for labview and see how i get on. 

    Many thanks for your response,

    Tim

    Wednesday, February 25, 2015 9:05 AM