472,353 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Date Time Picker and empty databases

Hi. I have a date time picker in my program which uses ADO to read from an
Access database. It works perfectly, unless the database is empty (no
records) when opened. When you try to open an empty database, the date time
picker returns error 545. Any attempts to progmatically add new records
after the empty database has been opened returns, or to use the DTP and set
a new date for those added records, "Field not updateable, Bound Property
Name: Value, Field Name: Date Planted"

Any ideas?
Set dtpDate.DataSource = adoRecordSet
dtpDate.DataField = "Date Planted"

<Ade
--
Adrian Parker. Ordained priest. <ad***********@sympatico.ca>
Want to know the purpose of life? I'd be happy to share it with you...
Jul 17 '05 #1
5 6929
That Date-Time Picker is being a little bit funky.

If you go to the Date-Time Picker, and set its Checkbox property to true, that
will allow the bound field to be null. This is what is happening with no
records, or with new records. Otherwise, it is trying to get a date out of a
field that is null, which generates the errors you are seeing.

The user then has to check the box to "activate" the date picker. It ain't the
prettiest thing I've ever seen, but it should work correctly.

"Adrian Parker" <no@addy.com> wrote in message
news:Fc*******************@news20.bellglobal.com.. .
Hi. I have a date time picker in my program which uses ADO to read from an
Access database. It works perfectly, unless the database is empty (no
records) when opened. When you try to open an empty database, the date time
picker returns error 545. Any attempts to progmatically add new records
after the empty database has been opened returns, or to use the DTP and set
a new date for those added records, "Field not updateable, Bound Property
Name: Value, Field Name: Date Planted"

Any ideas?
Set dtpDate.DataSource = adoRecordSet
dtpDate.DataField = "Date Planted"

<Ade
--
Adrian Parker. Ordained priest. <ad***********@sympatico.ca>
Want to know the purpose of life? I'd be happy to share it with you...

Jul 17 '05 #2
why not
1) check the recordset (on that table or query) and if empty ............
report that fact back to the user
or if there are records
2) check for a NULL in that field and if so.............. report that fact
back to the user

Fud

"Steve Gerrard" <no*************@comcast.net> wrote in message
news:kP********************@comcast.com...
That Date-Time Picker is being a little bit funky.

If you go to the Date-Time Picker, and set its Checkbox property to true, that will allow the bound field to be null. This is what is happening with no
records, or with new records. Otherwise, it is trying to get a date out of a field that is null, which generates the errors you are seeing.

The user then has to check the box to "activate" the date picker. It ain't the prettiest thing I've ever seen, but it should work correctly.

"Adrian Parker" <no@addy.com> wrote in message
news:Fc*******************@news20.bellglobal.com.. .
Hi. I have a date time picker in my program which uses ADO to read from an Access database. It works perfectly, unless the database is empty (no
records) when opened. When you try to open an empty database, the date time picker returns error 545. Any attempts to progmatically add new records
after the empty database has been opened returns, or to use the DTP and set a new date for those added records, "Field not updateable, Bound Property Name: Value, Field Name: Date Planted"

Any ideas?
Set dtpDate.DataSource = adoRecordSet
dtpDate.DataField = "Date Planted"

<Ade
--
Adrian Parker. Ordained priest. <ad***********@sympatico.ca>
Want to know the purpose of life? I'd be happy to share it with you...


Jul 17 '05 #3
"Fuddzy" <ch******@accesscomm.ca> wrote in message
news:3f******@news3.accesscomm.ca...
why not
1) check the recordset (on that table or query) and if empty ............
report that fact back to the user
or if there are records
2) check for a NULL in that field and if so.............. report that fact
back to the user
In this case the user should be allowed to delete all records, close the
database, and if he wants reopen at a later time and using my program add
more entries.

I think the teacher will doc me marks if I don't allow the database to open
if it's empty.
Adrian

"Steve Gerrard" <no*************@comcast.net> wrote in message
news:kP********************@comcast.com...
That Date-Time Picker is being a little bit funky.

If you go to the Date-Time Picker, and set its Checkbox property to true,
that
will allow the bound field to be null. This is what is happening with no
records, or with new records. Otherwise, it is trying to get a date out
of a
field that is null, which generates the errors you are seeing.

The user then has to check the box to "activate" the date picker. It
ain't the
prettiest thing I've ever seen, but it should work correctly.

"Adrian Parker" <no@addy.com> wrote in message
news:Fc*******************@news20.bellglobal.com.. .
Hi. I have a date time picker in my program which uses ADO to read from
an Access database. It works perfectly, unless the database is empty (no
records) when opened. When you try to open an empty database, the
date
time picker returns error 545. Any attempts to progmatically add new
records after the empty database has been opened returns, or to use the DTP and
set a new date for those added records, "Field not updateable, Bound Property Name: Value, Field Name: Date Planted"

Any ideas?
Set dtpDate.DataSource = adoRecordSet
dtpDate.DataField = "Date Planted"

<Ade
--
Adrian Parker. Ordained priest. <ad***********@sympatico.ca>
Want to know the purpose of life? I'd be happy to share it with

you...



Jul 17 '05 #4
"Steve Gerrard" <no*************@comcast.net> wrote in message
news:kP********************@comcast.com...
That Date-Time Picker is being a little bit funky.

If you go to the Date-Time Picker, and set its Checkbox property to true, that will allow the bound field to be null. This is what is happening with no
records, or with new records. Otherwise, it is trying to get a date out of a field that is null, which generates the errors you are seeing.

The user then has to check the box to "activate" the date picker. It ain't the prettiest thing I've ever seen, but it should work correctly.
Yes, I quite like this fix. It may not be perfect, but it does the job
well. Besides I can always progmatically check whether it's Null, and set
the CheckBox value progmatically.


"Adrian Parker" <no@addy.com> wrote in message
news:Fc*******************@news20.bellglobal.com.. .
Hi. I have a date time picker in my program which uses ADO to read from an Access database. It works perfectly, unless the database is empty (no
records) when opened. When you try to open an empty database, the date time picker returns error 545. Any attempts to progmatically add new records
after the empty database has been opened returns, or to use the DTP and set a new date for those added records, "Field not updateable, Bound Property Name: Value, Field Name: Date Planted" Set dtpDate.DataSource = adoRecordSet
dtpDate.DataField = "Date Planted"

Jul 17 '05 #5
of course YOU would not give control to the user..................... all i
suggested was the logic required to HANDLE your situation ..the rest is up
to u............good luck..................

fud
"Adrian Parker" <no@addy.com> wrote in message
news:gT********************@news20.bellglobal.com. ..
"Fuddzy" <ch******@accesscomm.ca> wrote in message
news:3f******@news3.accesscomm.ca...
why not
1) check the recordset (on that table or query) and if empty .............
report that fact back to the user
or if there are records
2) check for a NULL in that field and if so.............. report that fact back to the user
In this case the user should be allowed to delete all records, close the
database, and if he wants reopen at a later time and using my program add
more entries.

I think the teacher will doc me marks if I don't allow the database to

open if it's empty.
Adrian

"Steve Gerrard" <no*************@comcast.net> wrote in message
news:kP********************@comcast.com...
That Date-Time Picker is being a little bit funky.

If you go to the Date-Time Picker, and set its Checkbox property to
true,
that
will allow the bound field to be null. This is what is happening with no records, or with new records. Otherwise, it is trying to get a date out of
a
field that is null, which generates the errors you are seeing.

The user then has to check the box to "activate" the date picker. It

ain't
the
prettiest thing I've ever seen, but it should work correctly.

"Adrian Parker" <no@addy.com> wrote in message
news:Fc*******************@news20.bellglobal.com.. .
> Hi. I have a date time picker in my program which uses ADO to read

from
an
> Access database. It works perfectly, unless the database is empty

(no > records) when opened. When you try to open an empty database, the

date
time
> picker returns error 545. Any attempts to progmatically add new

records > after the empty database has been opened returns, or to use the DTP and
set
> a new date for those added records, "Field not updateable, Bound

Property
> Name: Value, Field Name: Date Planted"
>
> Any ideas?
>
>
> Set dtpDate.DataSource = adoRecordSet
> dtpDate.DataField = "Date Planted"
>
>
>
> <Ade
> --
> Adrian Parker. Ordained priest. <ad***********@sympatico.ca>
> Want to know the purpose of life? I'd be happy to share it with

you... >
>



Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: TD | last post by:
This code doesn't work. Every posting I can find suggests that it should. If TypeOf controlname Is DTPicker then do something here End If I...
7
by: XmlAdoNewbie | last post by:
Hi All, I am wondering if it is possible to allow nulls or empty strings when it comes to the datetimepicker control. I have an app with a few...
2
by: John Smith | last post by:
Hello all: I am having some difficulty trying to bind some Date Time Picker controls to a database that may have Null values in some of these...
2
by: Need Helps | last post by:
The example given in msdn.com on how to create a Date Time Picker involves using the CreateWindowEx function. However, I created a dialog box using...
4
by: Rethish | last post by:
Hi All, I am developing an application in VB.net. I am using .Net Datetime picker control to manage the date. But I am not able to assign...
4
by: Michael Turner | last post by:
Hi Guys I have two DateTime pickers one shows the Date and the other the time, this is a requirement of the solution. The problem I have is that...
2
by: Darhl Thomason | last post by:
I'm converting my Access 2003 VBA app. I have a number of date fields in my db that I want to use the date/time picker control with, but if there...
4
by: Michel Posseth [MCP] | last post by:
I have a problem with the date time picker validate event wich i believe is a bug How to reproduce : throw on a form a date time picker...
0
by: fredloh | last post by:
i have a tab control on my form. i then have several microsoft date and time picker control on the tab control. when i select a date on any of the...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.