Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. odbc build for centos/rhel 5.x and ms sql

odbc build for centos/rhel 5.x and ms sql

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 14.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    M
    mjcig
    wrote on last edited by
    #1

    For testing the product I built and compiled the initial binaries using mysql. All works great and extremely happy with the  product and capabilities after demoing for one of our teams. To review and further prove out the product, we are interested in building the libraries to work with MS SQL server and hoping for some advice.

    In the installation doc, ODBC is supported but read the unixODBC package is needed. One question I asked is... must I compile the source with unixodbc to work with MS SQL server backend?  Or will the product only work with Windows and ms sql server?

    Additionally, I figured I would attempt to build the files using our DataDirect drivers as these are our firm standard. During the build I receive the following error, see below. 

    make[5]: Entering directory `/logs/tmp/netxms/netxms-1.2.9/src/db/dbdrv/odbc'
      CXX    odbc_la-odbc.lo
    odbc.cpp: In function 'void* DrvPrepare(ODBCDRV_CONN*, wchar_t*, DWORD*, wchar_t*)':
    odbc.cpp:303: error: cannot convert 'short unsigned int*' to 'char*' in initialization
    odbc.cpp: In function 'DWORD DrvQuery(ODBCDRV_CONN*, wchar_t*, wchar_t*)':
    odbc.cpp:511: error: cannot convert 'short unsigned int*' to 'char*' in initialization
    odbc.cpp: In function 'void* DrvSelect(ODBCDRV_CONN*, wchar_t*, DWORD*, wchar_t*)':
    odbc.cpp:639: error: cannot convert 'short unsigned int*' to 'char*' in initialization
    odbc.cpp: In function 'void* DrvAsyncSelect(ODBCDRV_CONN*, wchar_t*, DWORD*, wchar_t*)':
    odbc.cpp:804: error: cannot convert 'short unsigned int*' to 'char*' in initialization
    odbc.cpp: In function 'wchar_t* DrvGetFieldAsync(ODBCDRV_ASYNC_QUERY_RESULT*, int, wchar_t*, int)':
    odbc.cpp:935: error: cannot convert 'char*' to 'const short unsigned int*' for argument '1' to 'size_t ucs2_to_ucs4(const short unsigned int*, int, wchar_t*, int)'
    make[5]: *** [odbc_la-odbc.lo] Error 1

    Here is my configure command line argument...
    ./configure --with-server --with-agent --with-odbc=/tp64/db/DD/7.0.1 --prefix=/opt/netxms-prod CPPFLAGS="-DODBC64 -I/tp64/db/DD/7.0.1/include" LDFLAGS="-L/tp64/db/DD/7.0.1/lib"

    Any suggestions or possible options to try to get the files built with this driver? Or do I need to use unixodbc?

    Appreciate your help in advance.

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi!

      We never try to build our ODBC driver with anything other then unixODBC on Linux. However, it should work if ODBC API is implemented correctly. Lines with errors looks like this:

      SQLWCHAR *temp = UCS2StringFromUCS4String(pwszQuery);

      from the error it seems that SQLWCHAR in your ODBC SDK defined to char, not unsigned short as expected. Does DataDirect ODBC implementation support wide character ODBC API? Maybe there should be additional defines to enable it?

      Best regards,
      Victor

      1 Reply Last reply
      0
      • M
        M
        mjcig
        wrote on last edited by
        #3

        I need to take a look further if it does and see what I find. thanks for your response and appreciate the help.

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups