Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Out of date Libraries? Not quite sure whats going on.

mssql odbc header libraries

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1 xXAlphaXx

xXAlphaXx

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 109 posts

Posted 05 June 2014 - 02:05 PM

So, I have been poking around for guides and such on how to connect to MSSQL through ODBC to give me something new to practice. I have found two things: Microsoft has their own example of how it should be done and I also found this guide as well. Through the both I'be been managing to put together some code and some notes. 

 

However, strangely enough when I go to compile and test my code there appears to be an upwards of 50 - 60 errors in the header files. This issue still occurs when using the source code directly from MS. However, when I load up their solution file, I get a message about upgrading the VC++ compiler and libraries. I do the update, and the code executes flawlessly. I get why upgrading the solution written in a older version is required, but why would using older code that has been adapted to the new version prevent the errors in the header files? Is there something fundamental I am missing here?


Edited by xXAlphaXx, 05 June 2014 - 02:06 PM.


#2 0xDEADBEEF

0xDEADBEEF

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 790 posts

Posted 06 June 2014 - 04:40 AM

Depends what the errors are. The possible cause here is project settings causing you the errors, whereas the settings are correct in the downloaded project.


Creating SEGFAULTs since 1995.


#3 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 07 June 2014 - 03:49 PM

Different version of libraries, different version of headers, it's totally logical, and a pain in the backside of course.



#4 0xDEADBEEF

0xDEADBEEF

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 790 posts

Posted 07 June 2014 - 11:42 PM

yes always a pain. Always has been , always will be.


Creating SEGFAULTs since 1995.


#5 xXAlphaXx

xXAlphaXx

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 109 posts

Posted 11 June 2014 - 01:45 PM

Different version of libraries, different version of headers, it's totally logical, and a pain in the backside of course.

 

So how do I get around this? Find those specific libraries and headers and explicitly include them? Is their anyway to make it use an older version? Or should I be using different functions entirely?


Edited by xXAlphaXx, 11 June 2014 - 01:59 PM.


#6 0xDEADBEEF

0xDEADBEEF

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 790 posts

Posted 12 June 2014 - 01:04 PM

you have to use the correct libraries - for example its possible that you arn't even including/linking to the correct libraries or source. Have a look at the compiler options in the solution file that works and make sure you're using the same options in your solution.


Creating SEGFAULTs since 1995.


#7 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 17 June 2014 - 08:15 PM

The sad and ugly truth is that you need to wrap up and save your whole projects when you are finished with them. All the files, libraries, dlls, sources, resources, etc. Because in the future all the libs will actualize and you might not be able to compile them with new versions of those installed in your computer.

 

It's nice to be up to date, but it's nicer to have all of your projects ready to compile any time you want.



#8 xXAlphaXx

xXAlphaXx

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 109 posts

Posted 09 July 2014 - 04:06 PM

Oops. I feel like a butt for not thanking you all for the help on this one!

 

Thank you guys all! I am not sure what changed but I loaded the source code on another computer a couple of days later and it suddenly began working. I didn't use the older libraries or anything. Strange.

 

But anyways, thank you all for the help!


Edited by xXAlphaXx, 09 July 2014 - 04:06 PM.





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download