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

[Gambas-bugtracker] Bug #3021: gb.db2 Null dates error


http://gambaswiki.org/bugtracker/edit?object=BUG.3021&from=L21haW4-

bruce B reported a new bug.

Summary
-------

gb.db2 Null dates error

Type             : Bug
Priority         : High
Gambas version   : Master
Product          : Database component


Description
-----------

I have a table in a postgresql database that has a date column that can be null.

When I load a record (via result=conn.Edit(table,pkey) I then convert the null date to Date(1900,1,1) so Gambas can cope.

I then change a different value and try to save the record:
1) if that date column is 1/1/1900 then I set the result!datechanged value to null
2) I issue a result.Save and get a db.error of 7 and the result!datechanged is "-- 14:30:00" not NULL

This does not happen with the old gb.db component.


System information
------------------

[System]
Gambas=3.20.99 3f2b374af (local)
OperatingSystem=Linux
Distribution=Debian GNU/Linux 11 (bullseye)
Kernel=5.10.0-34-amd64
Architecture=x86_64
Cores=16
Memory=5852M
Language=en_AU.UTF-8
Platform=x11
Desktop=XFCE
DesktopResolution=96
DesktopScale=9
WidgetTheme=proxy
Font=Liberation Sans,12
DarkTheme=False
[Programs]
dpkg=Debian 'dpkg' package management program version 1.20.13 (amd64).
gcc=gcc (Debian 10.2.1-6) 10.2.1 20210110
git=git version 2.30.2
msgmerge=msgmerge (GNU gettext-tools) 0.21
rpmbuild=RPM version 4.16.1.2
trans=Translate Shell 0.9.6.12
[Libraries]
Cairo=libcairo.so.2.11600.0
Curl=libcurl.so.4.7.0
DBus=libdbus-1.so.3.19.17
GDK2=libgdk-x11-2.0.so.0.2400.33
GDK3=libgdk-3.so.0.2404.20
GStreamer=libgstreamer-1.0.so.0.1804.0
GTK+2=libgtk-x11-2.0.so.0.2400.33
GTK+3=libgtk-3.so.0.2404.20
OpenGL=libGL.so.1.7.0
Poppler=libpoppler.so.102.0.0
QT5=libQt5Core.so.5.15.2
QT6=libQt6Core.so.6.4.2
RSvg=librsvg-2.so.2.47.0
SDL=libSDL2-2.0.so.0.2600.4
SQLite3=libsqlite3.so.0.8.6
[Environment]
DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbus-SLjCX7eEd6,guid=f1fb5a446edc62a06977e11767f37331
DESKTOP_SESSION=xfce
DISPLAY=:0.0
EDITOR=geany
GB_GUI=gb.qt5
GDMSESSION=xfce
GDM_LANG=en_AU.UTF-8
GTK3_NOCSD_IGNORE=1
GTK_CSD=1
GTK_MODULES=canberra-gtk-module
HOME=<home>
LANG=en_AU.UTF-8
LANGUAGE=en_AU.UTF-8
LOGNAME=<user>
PAPERSIZE=a4
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
PWD=<home>
QT_ACCESSIBILITY=1
QT_LOGGING_RULES=*.debug=false
QT_PLATFORMTHEME=gtk2
QT_PLATFORM_PLUGIN=gtk2
QT_QPA_PLATFORMTHEME=gtk2
QT_SCALE_FACTOR=1
SESSION_MANAGER=local/<hostname>:@/tmp/.ICE-unix/287835,unix/<hostname>:/tmp/.ICE-unix/287835,inet6/<hostname>:35979,inet/<hostname>:44059
SHELL=/bin/bash
SSH_AGENT_PID=287917
SSH_AUTH_SOCK=/tmp/ssh-ZKnWFW67IS89/agent.287835
TZ=:/etc/localtime
USER=<user>
XAUTHORITY=<home>/.Xauthority
XDG_CONFIG_DIRS=/etc/xdg
XDG_CURRENT_DESKTOP=XFCE
XDG_DATA_DIRS=/usr/share/xfce4:<home>/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/usr/share
XDG_GREETER_DATA_DIR=/var/lib/lightdm/data/<user>
XDG_MENU_PREFIX=xfce-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=xfce
XDG_SESSION_ID=141
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session2
XDG_SESSION_TYPE=x11
XDG_VTNR=7


----[ Gambas bugtracker-list is hosted by https://www.hostsharing.net ]----