CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Pulling values from listboxes

Print topic Send  topic

Author Message
thsman

Posts: 27
Posted: 02/14/2012, 6:19 PM

Using the application builder I have created an add/edit/delete form. One field in the database contains opening times in date format. The builder added an ajax inline date picker. I removed this and changed the textbox it was attached to with a listbox. This is populated programatically and is loaded with a list of possible opening times.

In use I want the user's listbox selection to get into the database record either as an edit or a new record. But it is not getting pulled or is not getting pulled correctly.

Any value chosen ends up in the db as 00:00:00. The db (an mdb file) has this field set as a date/time with the format set to hh:mm am/pm as is the listbox in the app.

Any ideas?

I'm using asp as the language for this.
View profile  Send private message
andy


Posts: 183
Posted: 02/15/2012, 7:04 AM

Have you checked the date/time format in your database connection settings?
There are the two data/time format fields for the input field's properties (display and database format)... Are these all correctly set?
_________________
Andy

RAD tools for rich UI controls:
http://www.koolphptools.com
View profile  Send private message
thsman

Posts: 27
Posted: 02/15/2012, 7:20 AM

The connection date format property is set to dd/mm/yyyy HH:nn:ss. There is no time only option there.

I don't know what you mean by display property. Where would that be?

In any case there are other tables such as bookings that contain dates that I want to show as dates. Wouldn't setting this at the connection level defeat showing dates or would I set up multiple connections?

In case I didn't mention it I am using CCS 5
View profile  Send private message
andy


Posts: 183
Posted: 02/15/2012, 9:09 AM

Sorry, I was relating to the two properties for a Text Box: namely Format and DBFormat

However, if you are setting it as a listbox, then may be you will need to format the field value before it can be saved to your database as a date formatted correctly for your database.
You may have to change your database field type.
I'm not sure that the Listbox control formats dates and times correctly... I'm guessing that may be the problem.
_________________
Andy

RAD tools for rich UI controls:
http://www.koolphptools.com
View profile  Send private message
thsman

Posts: 27
Posted: 02/15/2012, 11:23 AM

Ah gotcha.

The times could be stored in the db as strings but at some point in the app I will need to check to see if a time is equal to or later than another time. I can probably work that out with cDate.

Thanks very much for your help.

View profile  Send private message
andy


Posts: 183
Posted: 02/15/2012, 12:26 PM

Check out these two functions in your Help file, which can also be useful for parsing and formatting dates:
CCParseDate()
CCFormatDate()

Good luck!
_________________
Andy

RAD tools for rich UI controls:
http://www.koolphptools.com
View profile  Send private message
thsman

Posts: 27
Posted: 02/15/2012, 2:52 PM

Thanks Andy
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.