OK, I've removed the CursorFill() statement from the BeforeCursorFill. Doug, your explanation seems to make sense to me. Now I'm trying to set the cSelectCmd and the lUseCursorSchema=.T. but it doesn't seem to be using the schema. Now the code is stripped down to pretty straight-forward stuff.
I've also tried doing a dodefault(params) in BeforeCursorFill...but that didn't seem to help.
Any ideas?
Thanks,
Tom Johnson
x=CREATEOBJECT("nwDataEnv")
SET STEP ON
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.Init()
*!* cSelectCmd="EXEC CustOrdersOrders 'TOMSP'"
*!* ENDPROC
PROCEDURE caOrders.BeforeCursorFill
LPARAMETERS luseCursorSchema, lNoDataOnLoad, cSelectCmd
cSelectCmd="EXEC CustOrdersOrders 'TOMSP'"
lUseCursorSchema=.t.
ENDPROC
ENDDEFINE
Previous
Next
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