3 questions
Thorsten Hohage
thohage at objectmanufactur.com
Fri Oct 19 08:38:55 CDT 2007
Hi Joseph,
On 2007-10-19, at 15:12, Joseph Morgan wrote:
> On Oct 19, 2007, at 6:15 AM, Thorsten Hohage wrote:
>
>> How do you try to access the date in RB, can you copy the line here?
>
>
> I am using the vrbdatabase like this:
>
> db.sqlselect("select myDateField from myTable")
>
> //this part creates exception because in debugger you can see the
> date is formatted mm/dd/yyyy
> //and I am sure realbasic wants yyyy-mm-dd
> msgbox db.idxfield(1).shortdate
Perhaps this is nonsense, because Valentina overwrite some classes
(Ruslan may correct me, if I'm wrong here :-))
What you do, is using the REALbasic "style" of accessing Values and
this idxfield().shortdate is furthermore not 100% fail safe.
idxfield() return a REALBasic DatabaseField and for this there is no
"shortdate" method defined for, perhaps with some undocumented
function in RB (or overwritten by Valentina). "shortdate" is only
defined for a variable of type Date. But if it is defined you expect
here, that there is a value in idxfield and that this value is of
type Date. Better try step by step with some variables to see what
happens.
When working with VCursor you can access the fields with DateField()
and you have the correct methods defined to get a Date from Valentina.
regards
Thorsten Hohage
--
objectmanufactur.com - Hamburg,Germany
More information about the Valentina
mailing list