|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
c sql server library?Hi,
I'm trying to connect to a sql server 2000 box using c but cannot find a library for it, any ideas the best way to connect to it? Cheers c19 You can use dblib. You should also be able to use oledb IIRC with c.
-- Show quoteHide quoteHilary Cotter Director of Text Mining and Database Strategy RelevantNOISE.Com - Dedicated to mining blogs for business intelligence. This posting is my own and doesn't necessarily represent RelevantNoise's positions, strategies or opinions. Looking for a SQL Server replication book? http://www.nwsu.com/0974973602.html Looking for a FAQ on Indexing Services/SQL FTS http://www.indexserverfaq.com "c19h28o2" <michael.bea***@barclays.co.uk> wrote in message news:1157973953.692119.208960@i3g2000cwc.googlegroups.com... > Hi, > > I'm trying to connect to a sql server 2000 box using c but cannot find > a library for it, any ideas the best way to connect to it? > > Cheers > > c19 > DbLib is deprecated, and OleDB is a COM library. ODBC might be simpler from
straight C. In general you should be using SQL Native Client. Here's a link http://msdn.microsoft.com/data/ref/sqlnative/ David <DIV>"Hilary Cotter" <hilary.cot***@gmail.com> wrote in message news:%236CienZ1GHA.4300@TK2MSFTNGP03.phx.gbl...</DIV>> You can use dblib. You should also be able to use oledb IIRC with c.Show quoteHide quote > > -- > Hilary Cotter > Director of Text Mining and Database Strategy > RelevantNOISE.Com - Dedicated to mining blogs for business intelligence. > > This posting is my own and doesn't necessarily represent RelevantNoise's > positions, strategies or opinions. > > Looking for a SQL Server replication book? > http://www.nwsu.com/0974973602.html > > Looking for a FAQ on Indexing Services/SQL FTS > http://www.indexserverfaq.com > > > > "c19h28o2" <michael.bea***@barclays.co.uk> wrote in message > news:1157973953.692119.208960@i3g2000cwc.googlegroups.com... >> Hi, >> >> I'm trying to connect to a sql server 2000 box using c but cannot find >> a library for it, any ideas the best way to connect to it? >> >> Cheers >> >> c19 >> > > Hi,
Thanks but i'm actually on a unix svr4.0 (very old!) so I can only use c.... Any ideas? <DIV>"c19h28o2" <michael.bea***@barclays.co.uk> wrote in
message news:1158094937.441150.295930@p79g2000cwp.googlegroups.com...</DIV>> Well being on Unix is much more of a problem than using c.Hi, > > Thanks but i'm actually on a unix svr4.0 (very old!) so I can only use > c.... > As far as I know, here are the options for using SQL Server from unix. 1) There are many libraries for accessing SQL Server from c on Windows. There are some third-party unix libraries for SQL Server (web search for these). 2) Use Java (there is a JDBC driver for SQL Server), although from old unixes, I doubt this will work. 3) Otherwise you can migrate your code to windows (possibly running in the Windows Subsystem For Unix). http://www.microsoft.com/windowsserver2003/r2/unixinterop/default.mspx 4) Use TCP/IP sockets to communicate with a windows program that directly accesses SQL Server. If you have XML and SOAP capabilities in your Unix environment, this is easy as SQL Server 2005 natively supports SOAP. Otherwise you need to code a socket server running on Windows (possibly running in the Windows Subsystem For Unix), and communicate with that. David David,
Thanks for the suggestions, I might try the sockets route, although my socket skills are currently zero! maybe I could knock up a litte .net app to interface between my unix code and sql server? possible? Thanks Michael <DIV>"c19h28o2" <michael.bea***@barclays.co.uk> wrote in
message news:1158100498.994269.197750@d34g2000cwd.googlegroups.com...</DIV>> Yes. At least on the Windows side, writing a socket server in .NET is very David, > > Thanks for the suggestions, I might try the sockets route, although my > socket skills are currently zero! > > maybe I could knock up a litte .net app to interface between my unix > code and sql server? possible? > easy. And writing a socket server is easier than writing a socket client, so you'd be knocking out the harder part. But you'd still be on the hook for implementing a protocol on top of TCP/IP. Or you can use HTTP 1.0 from the unix client. It's super-simple to implement even without a library on the client side. The server side is harder, but there you can simply use ASP.NET or the .NET System.Net.HttpListener. The content-type can be strings, or binary structures, or whatever is easy for the unix client. David
Other interesting topics
Storing all Upper Case value
best way to bulk update SQL 2005: Pivot question sproc variable question-newbe Running Average Query ? A Challenge Database design question How to pass a list of parameters from Select Table What is it that I don't understand about varbinary and datatype co Service Broker Rollback actions of SP |
|||||||||||||||||||||||