OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Null Date Field with Microsoft Access

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
cgriella
General User
General User


Joined: 25 May 2009
Posts: 20

PostPosted: Thu Aug 27, 2009 6:39 pm    Post subject: Null Date Field with Microsoft Access Reply with quote

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
View user's profile Send private message
r4zoli
Super User
Super User


Joined: 17 May 2005
Posts: 570
Location: Budapest, Hungary

PostPosted: Thu Aug 27, 2009 10:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
cgriella
General User
General User


Joined: 25 May 2009
Posts: 20

PostPosted: Fri Aug 28, 2009 3:55 am    Post subject: Reply with quote

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
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Fri Aug 28, 2009 4:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group