freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Mark J. Lilback" <mark AT lilback.com>
- To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
- Subject: Re: prerelease delayed by documentation
- Date: Wed, 4 Sep 2002 08:44:14 -0400
At 6:49 AM -0400 9/4/2002, Brian Bruns wrote:
Problem is, it's a complete mess figuring out what partially broken
implementation you have, and "emulate little endian" works regardless,
broken or not. I assume most people will be using TDS 7.0/8.0 so we are
only talking about a small portion of the user base in the first place.
I have code that I'm using to figure out if they are on a broken implementation. I'm only using in on Mac OS 9, since I haven't back ported freeTDS to there in a while.
I agree that it is kludge, but here's the code anyway.
/* Checks for messed up dates on SQL Server 7, and if on SQL Server 8 */
Boolean
CheckForServerDependentData(SQLServerSessionData *myData)
{
RETCODE err;
DBCHAR verString[128], tmpc[2];
DBINT theVersion=0;
err = dbcmd(myData->dbproc, "master.dbo.xp_msver ProductVersion");
err = dbsqlexec(myData->dbproc);
if (err != TDS_SUCCEED) {
dbfreebuf(myData->dbproc);
return false;
}
while (dbresults(myData->dbproc) != NO_MORE_RESULTS) {
dbbind(myData->dbproc, 4, STRINGBIND, 128, (BYTE*)verString);
if (dbnextrow(myData->dbproc) != NO_MORE_ROWS) {
//got a value. get ready to do the check on it
tmpc[0] = verString[0];
tmpc[1] = 0;
myData->majorVersionNum = atoi(tmpc);
if (0 == strncmp(verString, "7.00.", 5)) {
//it might be what we want. set theVersion
theVersion = atoi(&verString[5]);
}
while (dbnextrow(myData->dbproc) != NO_MORE_ROWS)
;
}
}
myData->messedUpDates = (myData->majorVersionNum == 7) && (theVersion < 961);
return true;
}
--
__________________________________________________________________________
"They that can give up essential liberty
Mark J. Lilback to obtain a little temporary safety
<mark AT lilback.com> deserve neither liberty or safety."
http://www.lilback.com/ -- Benjamin Franklin
-
prerelease delayed by documentation,
James K. Lowden, 09/03/2002
- <Possible follow-up(s)>
- Re: prerelease delayed by documentation, Brian Bruns, 09/03/2002
- Re: prerelease delayed by documentation, Lowden, James K, 09/03/2002
- Re: prerelease delayed by documentation, Brian Bruns, 09/03/2002
- Re: prerelease delayed by documentation, Eric Deutsch, 09/03/2002
- Re: prerelease delayed by documentation, Frediano Ziglio, 09/04/2002
- Re: prerelease delayed by documentation, Brian Bruns, 09/04/2002
- Re: prerelease delayed by documentation, Thompson, Bill D (London), 09/04/2002
- Re: prerelease delayed by documentation, Mark J. Lilback, 09/04/2002
- Re: prerelease delayed by documentation, Eric Deutsch, 09/04/2002
- Re: prerelease delayed by documentation, Frediano Ziglio, 09/04/2002
- Re: prerelease delayed by documentation, Eric Deutsch, 09/04/2002
- Re: prerelease delayed by documentation, Brian Bruns, 09/04/2002
- Re: prerelease delayed by documentation, Frediano Ziglio, 09/04/2002
- Re: prerelease delayed by documentation, Eric Deutsch, 09/04/2002
- Re: prerelease delayed by documentation, Brian Bruns, 09/04/2002
- Re: prerelease delayed by documentation, Brian Bruns, 09/05/2002
- Re: prerelease delayed by documentation, Frediano Ziglio, 09/05/2002
- Re: prerelease delayed by documentation, Eric Deutsch, 09/05/2002
Archive powered by MHonArc 2.6.24.