You are here: Re: dbinit(), dblogin(), how often? « MsSQL Server « IT news, forums, messages
Re: dbinit(), dblogin(), how often?

Posted by Erland Sommarskog on 06/01/07 06:53

Bruce. (noone@nowhere.com) writes:
> I'm a MS SQL newbie and am programming SQL using MS DS C++ 2003.
>
> I'm writing sql code that will reside in a shared dll, used by many
> processes and many threads in those processes.
>
> So how often do I need to call dbinit()? Only the first time the DLL is
> loaded, once per new process, once per thread, or once per database open?
>
> Same question for dblogin().

Zero times. At least unless you have some very special reason to use
DB-Library at all, like the need to support a legacy application. To wit,
DB-Library is a deprecated client API, and it lacks support for new features
added since SQL7, as Microsoft has not touched it for the last 8-10 years.

The recommended choice for a C++ application are ODBC and OLE DB. Of these
the ODBC is probably a lot easier to work with.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация