>I've setup a data schema for my cursor adapter. Its different that the field called EFFECTIVE is a DATETIME in SQLSERVER, but that I want it to be a DATE in VFP.
>
>No matter what I do, I can't get the cursoradapter to return EFFECTIVE as a DATE not a DATETIME. I've tried luseCursorSchema and I've tried calling CursorFill(.T.) myself.
>
>Any hints?
>
>Thanks, Tom Johnson
>
>
>
>
> ADD OBJECT curCapacity AS cursoradapter WITH ;
> UseDeDataSource = .T., ;
> DataSourceType = "ODBC", ;
> CursorSchema = "PLANID I, CAPACITYID I, FK_RESOURCEID I, EFFECTIVE D, CAPTYPECODE C(10), UNITS N(10, 3), CAPACITY N(10, 3), FK_CALENDARID I, TIMESTAMP_COLUMN M", ;
> Alias = "Capacity", ;
> Name = "curCapacity", ;
> AllowInsert = .T., ;
> AllowUpdate = .T., ;
> AllowDelete = .T., ;
> BufferModeOverride=5
>
>
> PROCEDURE curCapacity.BeforeCursorFill
> LPARAMETERS luseCursorSchema, lNoDataOnLoad, cSelectCmd
>
> TEXT NOSHOW TEXTMERGE PRETEXT 7 TO cSelectCmd
> EXEC rc_GetCapStatements ?this.parent.DbId,?this.parent.WifId,0
> ENDTEXT
> luseCursorSchema=.t.
> this.CursorFill(.T.)
> ENDPROC
Hi Tom,
Could you check if this.CursorFill(.T.) succeeds (returns .T.) and, if it is not, what error do you get (AERROR())?
Also, it is interesting to know what are the original data types for all columns.
Thanks,
Aleksey.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement