freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Brian Bruns <camber AT umcc.ais.org>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: Changing current database using TDS
- Date: Sat, 29 Jan 2000 10:47:28 -0500 (EST)
On Tue, 28 Mar 2000, Ian Charnas wrote:
> Another Question:
> In a TDS test program, kinda like samples/tdstest.c from the tds 0.50
> tarball, how would I add code to select which database to connect to,
> instead of the default one the TDS Compliant server connects me to?
>
> Ian Charnas.
>
>
You can't do it at login time, but after you log in you just send a query
'use dbname' and you should recieve an message back. Now, here is the
tricky part. We mostly toss the environment change tokens in the bit
bucket, so you could either rely on the TDS_MSG_TOKEN, or grab the
TDS_ENV_CHG_TOKEN and process it...tell ya what, I just fixed it
and commited the changes to CVS, grab the CVS version and look at t0003.c
in src/tds/unittests
Brian
-
Changing current database using TDS,
Ian Charnas, 01/28/2000
- <Possible follow-up(s)>
- Re: Changing current database using TDS, Brian Bruns, 01/29/2000
Archive powered by MHonArc 2.6.24.