Re: [gnome-db]Problems with a field date



I found the problem.

I think that the problem is with glib
I am using glib-1.2.10

I checked this with code:

day=31
month=12
year=2001

g_date_valid_day (day))       // Return True    This is OK
g_date_valid_month (month)      // Return True    This is OK
g_date_valid_year (year)     // Return True       This is OK

g_date_valid_dmy (day,month, year)    // Return False

g_date_days_in_month(month,year)      // Return 30 and must return 31
                                                           // because
december has 31 days

LIBGDA/providers/gda-postgres-server/gda-postgres-recordset.c call to
g_date_new_dmy(stm->tm_mday, stm->tm_mon, stm->tm_year+1900)

This function g_date_new_dmy valid the dates with the function
g_date_valid_dmy(day,month,year)
and here is the problem because to LIBGDA return FALSE

I proved with other date:

day=30
month=12
year=2001

And the result is OK. I don't know if just with day=31 is the problem


If someone knows the list of glib to ask about the problem


----- Original Message -----
From: "Branly Abendano" <babendan tecnopro net>
To: <gnome-db-list gnome org>
Sent: Tuesday, May 08, 2001 8:39 AM
Subject: [gnome-db]Problems with a field date


> Hello.
>
> I am developing an accounting application using libgda-0.2.3 y
> gnome-db-0.2.3
>
> I have almost everything working but I have a problem with the fields type
> date.
>
> I am using postgresql-7.1 (I proved with 7.0.x too). I have a table with a
> field date:
>
> FE_CIERRE DATE
>
> >From my code I send the query and I get the others fields without problem
> but this field is always <NULL>.
>
> I proved executing the same query using PSQL and this field is not null.
>
> Please I need to finish this early. I don't know where is the mistake.
>
> Please help me.
>
> Thanks
>
>
>
>
>
> _______________________________________________
> gnome-db-list mailing list
> gnome-db-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-db-list
>







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]