Unix Technical Forum

Problem of MS SQL ----ntwdblib.lib NOT found

This is a discussion on Problem of MS SQL ----ntwdblib.lib NOT found within the SQL Server forums, part of the Microsoft SQL Server category; --> Dear all, I want to use C program to connect MS SQL server. I copied some sample file to ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 06:12 PM
alan
 
Posts: n/a
Default Problem of MS SQL ----ntwdblib.lib NOT found

Dear all,

I want to use C program to connect MS SQL server.
I copied some sample file to install on my computer.
When I run the program, an error occurred, which is about ntwdblib.dll
not find in some paths.
But when I check the paths again, they have ntwdblib.dll.
When I run my C program in another computer, it works...

so , I feel very frustrated.

In my C program, I include the following libraries.
#define DBNTWIN32
#include "windows.h"
#include <sqlfront.h>
#include <sqldb.h>
#include <stdio.h>

Also, I don't know the meaning of "#define DBNTWIN32".
I haven't installed SQL Client on my computer. Is it the main
problem??

Pls help!!

Cheers,
Alan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 06:12 PM
Erland Sommarskog
 
Posts: n/a
Default Re: Problem of MS SQL ----ntwdblib.lib NOT found

alan (cheung_yuklun@i-cable.com) writes:
> I want to use C program to connect MS SQL server.
> I copied some sample file to install on my computer.
> When I run the program, an error occurred, which is about ntwdblib.dll
> not find in some paths.
> But when I check the paths again, they have ntwdblib.dll.
> When I run my C program in another computer, it works...
>
> so , I feel very frustrated.
>
> In my C program, I include the following libraries.
> #define DBNTWIN32
> #include "windows.h"
> #include <sqlfront.h>
> #include <sqldb.h>
> #include <stdio.h>
>
> Also, I don't know the meaning of "#define DBNTWIN32".
> I haven't installed SQL Client on my computer. Is it the main
> problem??


Yes, that is the problem. NTWDBLIB.DLL is the DLL for DB-Library, which
is not part of MDAC, so SQL connectivity is about the only way to install
it.

DB-Library is a very good client library, but unfortunately Microsoft
does not agree, so they stopped developmet of DB-Lib many years ago.
As a consequence, you have restricted support for new features in
SQL Server with DB-Library.

Unless you have some legacy software you are working with, I'd recommend
you to use ODBC or OLE DB instead.

--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:08 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com