Skip to Content.
Sympa Menu

freetds - Re: [freetds] Named Instances

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Named Instances
  • Date: Wed, 6 Apr 2005 20:56:03 -0400

Brett <generica AT email.com> wrote:
>
> Thanks for the info,
>
> It does seem to be connecting to the right instance, but I'm just having
> a lot of trouble understanding this library. There doesn't seem to be
> any simple instructions on the rudimentary operations I want to do:
>
> connect to a server, instance (got that part)
> perform a sql operation - call a stored procedure (got that part)
> get the row count for the operation ????
> iterate through, grabbing each row returned ????
> disconnect (got that part)
>
> I hate to be a bother, but honestly, I've looked at the unittests, and
> searched on the web, and inspected the header files, and there just
> doesn't seem to be examples that cover such a simple operation.

Hi Brett,

You're talking db-lib, right? I wrote src/apps/bsqldb.c just for you. It
does all the basics: connects, issues arbitrary queries, fetches rows
(regular and compute), and the rowcount if there is one, handles nulls,
checks for error conditions. db-lib is also documented in the FreeTDS
Reference Manual, although the vendors' websites do a more thorough job.

If you need return codes and output parameters from stored procedures,
IMHO src/dblib/unittests/rpc.c is a useful example of how to use the rpc
functions. If you have questions about it, feel free to post them here.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page