Where the )(*@#$()^&@ do I get sqlfront.h?

  • This may be crossposted to some other forums out of sheer desperation...

    Been working in Visual Studio 2005 and got to the point where I needed to build a native program that interfaces with SQL Server via the bulk copy API. So, I d/l'ed SQL Server 2005, installed it and tried a simple example from MSDN from the bcp_bind

    documentation.

    Fails because it is unable to find "sqlfront.h." I search the web. Best suggestion I can find is to install the "Platform SDK" Installed that. Installed everything I could find from the SQL Server 2005 distribution CDs. "sqlfront.h" is not in "Visual Studio 8/VC/PlatformSDK/include or

    "VIsual Studio 8/VC/include", where I would have thought they might end up.

    Found a reference that indicated there may be some kind of SQL Server SDK, or "Microsoft SQL Server Programmers Toolkit" that I might need to download, but so far I've been unable to find one. Toolkit appears to be obsolete anyway. Other suggestions indicate it may be included in the Platform SDK, but I already tried that, no cigar...

    Did a search of the whole computer. It found a copy of sqlfront.h, one in "Microsoft Visual Studio/VC98/include"-- which is one from VS 6.0, as I also have VS 6.0 on this system as that is what our current development uses, we're trying to move some things to .NET, and that's the only one it found.. Can I just use the includes from VS 6.0? Are these the latest ones and that's why I've been unable to find ones for VS 2005? Did Platform SDK install it in the wrong tree? If so, how do I correct for that? Can VS 2005 link with the ssociated library files from VS 6.0? How are you

    *supposed* to get these darn files so the stupid example will compile?

    I'm on XP SP2 BTW, and in the MSDN developer program (msdn universal volume license), if that is of any relevance.

    Uninstalling VS 6.0 is not an option, that's what all our current development is using. Installing VS 2005 on another PC is not an option, I'm the only developer in this particular office and they aren't going to buy me a new PC to do this. Deciding NOT to transition to .NET and VS 2005 is an option however, and the one I'm currently giving the most serious consideration. Uninstalling VS 2005 and going to VS 2003 or something could be an option, but it would be nice to know if it would actually fix the problem. Reverting to an eariler SQL Server version could be an option as well, but again, it'd be nice to know that it would actually fix the problem.

    I also noted that doing searches for stuff on MSDN does not make it very clear WHICH version of whatever (VS, VC++, SQL Server, etc.) the information applies to. Often I would find pages and wonder if it applies to the .NET version or is leftover from some previous incarnation of the product and possibly no longer applies to the .NET version. Best I can tell, you can't restrict searches by product version (if I'm wrong, please enlighten me). What a nightmare-- I've just spent 2 days trying to get the simplest of example programs to compile a native program on VS 2005.

    Plenty of other people seem to have inquired about

    the location of sqlfront.h though, I notice, yet so far I've not found a response that was helpful to me.

    Has ANYONE been able to compile a native VC++ program that talks to SQL Server on the 2005 versions of VS & SQL Server? Was it my mistake because I happened to choose to try the "latest" versions of these products just as they came out,

    and thought I could actually do something useful with them?

    If you've been able to make it work, where does your sqlfront.h file live on your system? Any idea how it got there?

    --

    Sync

  • Default path for it is (this is a SQL Server 2000 path):

    C:\Program Files\Microsoft SQL Server\80\Tools\DevTools\Include

    Don't see it at all on the SQL2K5 side.

    K. Brian Kelley
    @kbriankelley

  • Hmm-- I have an 80\Tools and a 90\Tools directory, but no DevTools under either. Time to search the install media to see if they're hiding in a .cab file or something, then figure out why it didn't get installed once I find it...

    Thanks for the tip. At this point I haven't even been able to figure out definitively if it should come with SQL Server or VS C++, or both-- but right now it didn't get installed with either...

  • If it helps any, it's on my Sql2K install CD, under \devtools\include.

    Been a while since I ran that installer, but I expect you need to select "Custom .." when running the installer, and select some optional client components to install in order to get it installed with the rest of the client components.

  • I selected the Dev Tools install when I did my SQL2K install, which is probably why I have it on my system. Never know when you might actually need something like that.

    K. Brian Kelley
    @kbriankelley

  • Well, best I can figure what happened was this-- I installed SQL Server 2005, but didn't select the "Workstation Components" portion as it mentioned things like "Books Online" (I didn't notice it also said Development Tools) which I figured was the documentation portion, thinking it's probably huge and I could probably get it either on the web or by inserting the CD, or at least, install it later. Then discovered the dev tools was in it, so I installed it separately afterwards. Even at that I didn't instally *everything*, just the client and samples which included the "Software Development Kit." Went back for another look, and see that under the Workstation Components currently do NOT show that the database services, analysis services, notification services or integration services are installed. HOWEVER, if I select them for installation and go forward it ultimately says "these things are already installed" and can't find anything to do. Looks like my piecemeal installation of things from the install media has confused it to the point it really doesn't know what's installed and what's not. Looks like I'll have to blow away the whole installation and reinstall SQL Server 2005-- a job for Monday at this point, as I'm going home for the weekend...

    --

    Sync

  • Well, here it is Monday and I'm back. Completely removed the SQL Server 2005 (developer edition) installation and started it over from scratch. Checked EVERYTHING to install, and when it's done looked for a DevTools directory. Word has it that the elusive include files are supposed to be in there, under MS SQL Server/80/Tools/DevTools (or perhaps 90/tools/DevTools). Nada. Tried installing the .NET Framework SDK. Still nothing.

    Going to try the Native Client D/L, then the Backward Compatibility Components piece, and then the Management Objects Collection, all downloads

    found on the SQL Server 2005 Feature Pack page.

    If none of those turn up the includes, I guess I'll try uninstalling SQL Server 2005 and try

    2003, as I definately get the impression the

    development includes just ain't in 2005....

    Arg. You'd think they'd test these things

    before releasing them...

  • Tried installing those Feature Packs-- all were

    already installed except the Management Objects

    collection and it didn't net me the includes.

    Then I find that there is no SQL Server 2003--

    he previous one was 2000, and that seems pretty

    old to be using for new development.

    I'd been using the 2005 Developer Edition-- will

    try the 2005 Enterprise Edition and report

    back. You'd think the "developer edition" would

    have such things important to developers as include

    files though...

    --

  • AAAAARRRRRGGGGGHHHHH!!!!! Found the answer:

    Looks like they changed the interface somewhat, and it wasn't easy

    to determine that-- the bcp_bind example was for SQL Server 2000,

    and it hasn't been updated for SQL Server 2005.

    Apparently, "sqlfront.h" and "sqldb.h" no longer exist. The old bulk

    copy functions are now ODBC based and use the include "sqlncli.h" and

    an ODBC handle instead of a DBPROCESS structure. There was an article

    in the books online entitled "Converting from DB Library to ODBC Bulk

    Copy functions" that explains the difference, which I never found

    because I didn't know about it and doesn't mention the differences in

    the includes, which is what breaks when you try the example found

    on the MSDN library (which is for SQL Server 2000).

    So, I'm going to work on converting the example to an ODBC version

    based on the articles I've found......

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply