Skip to Content.
Sympa Menu

freetds - RE: dblib problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Steven J. Backus" <backus AT math.utah.edu>
  • To: "TDS Development Group" <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: dblib problem
  • Date: Thu, 4 Apr 2002 21:20:54 -0700 (MST)


> I checked in some code to set default values for several datatypes. It's
> not an implementation of dbsetnull() but it should act reasonably like the
> default case. Someone want to give it a shot?

It's close, but there seems to be a problem. Here's some sample
data:

id aflag bstate bcont birthdate bday
bmonth byear birthdatemax birthdatemin
bordU bordma dead dage dstate dcont
deathdate dday dmonth dyear
lldate mult multord polyg race related sex
spanish still version
----------- ----- ----------------- -----------------
------------------------------ -----------
----------- ----------- ------------------------------
------------------------------
----------- ----------- ---- --------------------
----------------- -----------------
------------------------------ ----------- -----------
-----------
------------------------------ ----------- -----------
----- ----------------- ------- ---
----------- ----- --------------------
0 N NULL NULL
NULL NULL NULL NULL
NULL NULL NULL NULL

NULL NULL NULL NULL
May 23 1915 12:00:00:000AM NULL NULL N NULL NULL M
NULL NULL 1.070000
1 NULL NULL NULL NULL NULL
NULL NULL NULL NULL
NULL NULL NULL NULL
May 21 1799 12:00:00:000AM NULL NULL NULL NULL Y F
NULL NULL 9.990000
2 NULL NULL NULL NULL NULL
NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL
Aug 21 1798 12:00:00:000AM NULL NULL NULL NULL NULL M
NULL NULL 9.990000
3 N ENGLAND NULL May 21 1799 12:00:00:000AM 21
5 1799 May 21 1799 12:00:00:000AM May 21 1799
12:00:00:000AM
NULL 0 Y 72.000000 UTAH NULL
Aug 25 1871 12:00:00:000AM 25 8 1871
NULL N 9.990000
4 N ENGLAND NULL Dec 14 1795 12:00:00:000AM 14
12 1795 Dec 14 1795 12:00:00:000AM Dec 14 1795
12:00:00:000AM
NULL NULL Y 70.000000 UTAH USA
Aug 22 1865 12:00:00:000AM 22 8 1865
Aug 22 1865 12:00:00:000AM NULL NULL N NULL Y M
NULL N 1.350000
NULL
NULL
NULL
NULL NULL
NULL

In gdb;

(gdb) print id
$8 = 0
(gdb) cont (dbnextrow is run again)

(gdb) print id
$9 = 0 (should be 1)
(gdb) cont (dbnextrow is run again)

(gdb) print id
$10 = 0 (should be 2)
(gdb) cont (dbnextrow is run again)

(gdb) print id
$11 = 3 (is correct)

Seems like all those NULLS messed it up. Thanks for working on
this!

Steve




Archive powered by MHonArc 2.6.24.

Top of Page