Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't get ODBC cursoradapter to use Cursor Schema
Message
From
15/08/2003 12:29:16
Tom Johnson
Plymouth Rock Technology, Inc.
Plymouth, Massachusetts, United States
 
 
To
15/08/2003 11:49:54
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00820329
Message ID:
00820573
Views:
22
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
Map
View

Click here to load this message in the networking platform