Skip to Content.
Sympa Menu

freetds - Re: [freetds] connection pooling

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Shaun Craig <s.craig AT andronics.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>, "James K. Lowden" <jklowden AT schemamania.org>
  • Cc:
  • Subject: Re: [freetds] connection pooling
  • Date: Thu, 28 Oct 2004 10:21:17 +0100

On Thursday 28 October 2004 04:27, James K. Lowden wrote:
> Shaun Craig <s.craig AT andronics.com> wrote:
> > I currenly have a C program
> > that can query and insert to MS SQL on a windows machine, now i want to
> > set up connection pooling but dont know how. I've set up the
> > freetds.conf and pool.conf files ok and can tdspool myspool and start
> > the server, i dont know how to point my C program at the server?
>
> In pool.conf, you define a port that the pool server listens to, something
> like this:
>
> [mypool]
> user = webuser
> password = secret
> database = ebiz
> server = fooserv
> max pool conn = 7
> port = 5555
>
> In freetds.conf, you declare a server entry pointing to it:
>
> [pool]
> host = localhost #if that's where it's running
> port = 5555
> tds version = 4.2
>
> Then, you connect to [pool] per usual:
>
> DBPROCESS *db = dbopen (login, "pool");
>
> HTH.
>
> --jkl
>
>
>Thanks for the above. do i just use my normal functions after i call the
above line.
this is the order i have them in
dbinit()
dblogin()
dbsetluser()
dbsetlpwd()
dbopen()
dbuse()
dbquery()
dbsqlexec()
dbresult()
dbbind()
dbnextrow()
dbfreebuf()
dbclose()
dbexit()

any help would be great, thanks again!


> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page