| View previous topic :: View next topic |
| Author |
Message |
cgriella General User


Joined: 25 May 2009 Posts: 20
|
Posted: Thu Aug 27, 2009 6:39 pm Post subject: Null Date Field with Microsoft Access |
|
|
Could anybody help me!!
I didn't get delete a date from table in FrontEnd.odb, with it is a front-end for BackEnd.mdb. The files are in this link: http://uploading.com/files/MHTMX33W/DateField.rar.html
Does anybody known why? |
|
| Back to top |
|
 |
r4zoli Super User

Joined: 17 May 2005 Posts: 570 Location: Budapest, Hungary
|
Posted: Thu Aug 27, 2009 10:07 pm Post subject: |
|
|
I don't know, but I can delete whole row, it is a same result on this demo file.
May be it not help with real data base with more field.Same happens when mdb contain more than one date/time field?
I think it is more connected to mdb file, than OOo, but may be it is a driver problem.
And can edit data in with OOo 3.1 on winXP. |
|
| Back to top |
|
 |
cgriella General User


Joined: 25 May 2009 Posts: 20
|
Posted: Fri Aug 28, 2009 3:55 am Post subject: |
|
|
r4zoli,
I can delete whole row too. I don´t clean the date value. If I had only "FrontEnd-BackEnd.odb" I could clean the date field, and if I had only "FrontEnd-BackEnd.mdb" I could clean the date field" too. But when I have Front.odb with Back.mdb, I don´t get clean data field. Try insert, for example, the follow rows:
ID, Date (dd/mm/aaaa)
1, 10/01/2009
2, empty
3, 10/02/2009
Now, try clean value in date field:
1, 10/01/2009 => 1, empty
Are there a bug here?
See also http://www.oooforum.org/forum/viewtopic.phtml?t=86978
I only edit null date field with this code (OBS: strDate as string 'Format aaaa-mm-dd and structDate as New com.sun.star.util.Date)
| Code: | If strDate = "" Then
.setDate(2, structDate)
.setNull(2, com.sun.star.sdbc.DataType.DATE)
Else
.setString(2, strDate)
End If |
|
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
Posted: Fri Aug 28, 2009 4:51 am Post subject: |
|
|
Hello
I did not tried your code.
As far I can see you use a struc parameter on a place where you have to use long parameter
see here
I think you can use setnull only for parameters. I have never tried it
Romke |
|
| Back to top |
|
 |
|