Here's the example against Northwind. My goal is to return the dates as DATE and not DATETIME.
Thanks,
Tom Johnson
x=CREATEOBJECT("nwDataEnv")
x.opentables()
SELECT crsOrders
BROWSE
DEFINE CLASS nwDataEnv AS dataenvironment
Tag = "dsn=RoughCut;uid=sa;pwd=eternal;trusted_connection=no;"
Width = 520
Height = 200
DataSource = .NULL.
DataSourceType = "ODBC"
Name = "nwDataEnv"
PROCEDURE BeforeOpenTables
set multilocks on
This.DataSource = sqlstringconnect([dsn=Northwind;uid=sa;trusted_connection=no])
ENDPROC
ADD OBJECT caOrders AS cursoradapter WITH ;
UseDeDataSource = .T., ;
DataSourceType = "ODBC", ;
CursorSchema = "ORDERID I, ORDERDATE D, REQUIREDDATE T,SHIPPEDDATE T", ; && TRYING TO RETURN ORDERDATE AS DATE NOT DATETIME
Alias = "crsOrders", ;
Name = "caOrders", ;
BufferModeOverride=5 ;
PROCEDURE caOrders.BeforeCursorFill
LPARAMETERS luseCursorSchema, lNoDataOnLoad, cSelectCmd
cSelectCmd="EXEC CustOrdersOrders 'TOMSP'"
LOCAL bResult
bResult=this.CursorFill()
IF NOT(bResult)
AERROR(laError)
MESSAGEBOX(TRANSFORM(laError(1))+laError(2)) && returns 2077 "Operation is not allowed for cursoradapter at this time"
ENDIF
ENDPROC
ENDDEFINE
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only