New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hbpgsql problem insert empty date #234
Comments
In case of hbpgsql contrib i think you should rather use SQL equivalent of "empty date" state, which is NIL/NULL. hbpgsql patch proposals on how to handle such xBase constructs are possible too... should it be converted to NULL? |
The problem is when use :fieldPut, i think the problem is in the ValueToString when type field type is date. |
Consequently, PostgreSQL doesn't have anything that maps directly to xBase empty date, either:
Anyway i'll probably commit the latter while doing the sync of hbpgsql contrib NULL support changes from my repo and also Viktor's fork. This will take a while. |
I Submit a PR to solve the trouble, please review |
* contrib/hbpgsql/postgres.c ! guard PQEXECPARAMS() wrapper from generating unrecoverable error on empty parameter array "hb_xgrab requested to allocate zero bytes" * contrib/hbpgsql/tpostgre.prg ! corrected buggy parameter order in TPQserver():Query() * make TPQQuery, TPQRow classes more aware of NIL to NULL conversions, added support for inserting and updating empty xBase date value should fix issue #234, oRow:FieldPut( <n>, NIL ) also looks good
simple.txt
When insert empty date using fieldput return error:
ERROR: 22007: invalid input syntax for type date: " "
The text was updated successfully, but these errors were encountered: