freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Brian Bruns" <camber AT ais.org>
- To: freetds AT franklin.oit.unc.edu
- Subject: Re: DBLIB function
- Date: Mon, 8 Jul 2002 12:20:39 -0400
Here is a quick implementation....i'll add it when i get a chance.
DBBOOL DBISAVAIL(DBPROCESS *dbproc)
{
TDSSOCKET *tds = dbproc->tds_socket;
if (tds->state = COMPLETED && /* is there a query pending? */
tds->s ) { /* not sure if needed, but make sure socket is live */
return TRUE;
} else {
return FALSE;
}
}
The usual caveats about not compiling and such apply ;-)
Brian
> Hello Bill,
>
> DBISAVAIL is a function defined in the dblibrary (SYBinclude) provided by
> Sybase.
> Since I am trying to use the same application to connect to MS SQL Server
> (with minimal changes to the application),
>
> How can I achieve this functionality using FREETDS, would I be able to use
> DBDEAD to find out the database server is alive or not?
>
> Anagh
>
> -----Original Message-----
> From: Bill Thompson [mailto:thompbil AT exchange.uk.ml.com]
> Sent: Monday, July 08, 2002 9:23 PM
> To: TDS Development Group
> Subject: [freetds] Re: DBLIB function
>
>
> Anagh,
>
>
> > I am not able to find an equivalent to DBISAVAIL(dbproc) in FreeTDS
> > DBlib
> >
>
> No, I can't find it either except defined in sybdb.h . From the manual,
> I'm not sure of its purpose, and I've not come across this function
> before. The manual says this about it...
>
> "This routine indicates whether the specified DBPROCESS is available for
> general use. When a DBPROCESS is first opened, it is marked as being
> available, until some use is made of it. Many DB-Library routines will
> automatically set the DBPROCESS to "not available," but only dbsetavail
> will reset it to "available." This facility is useful when several parts
> of a program are attempting to share a single DBPROCESS."
>
> Is your use of DBISAVAIL necessary for your program ?
>
> > I have a program on a Solaris platform which connects to Sybase Database
> > using Sybase DB Library,
> > I am trying to convert that application to connect to my SQL Server using
> > FreeTDS Dblib,
> >
>
> FYI, and if you need a short term solution to the DBISAVAIL issue, you can
> still use Sybase's dblib to talk to SQL server, provided you call
> dbsetversion(DBVERSION_46) at the appropriate point in your program...
>
> Bill
>
> ---
> You are currently subscribed to freetds as: [anaghnath_paul AT satyam.com]
> To unsubscribe, forward this message to
> $subst('Email.Unsub')
> **************************************************************************
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
> distribution or forwarding of any or all of the contents in this message is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
> **************************************************************************
-
DBLIB function,
Anagh Nath Paul, 07/08/2002
- <Possible follow-up(s)>
- Re: DBLIB function, Bill Thompson, 07/08/2002
- Re: DBLIB function, AnaghNath_Paul, 07/08/2002
- Re: DBLIB function, Bill Thompson, 07/08/2002
- Re: DBLIB function, Brian Bruns, 07/08/2002
- Re: DBLIB function, AnaghNath_Paul, 07/08/2002
- Re: DBLIB function, Bill Thompson, 07/08/2002
- Re: DBLIB function, Lowden, James K, 07/08/2002
- Re: DBLIB function, Brian Bruns, 07/08/2002
- Re: DBLIB function, Lowden, James K, 07/08/2002
- Re: DBLIB function, Brian Bruns, 07/08/2002
- Re: DBLIB function, Brian Bruns, 07/08/2002
Archive powered by MHonArc 2.6.24.