Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Session Class and Buffering
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00776734
Message ID:
00776794
Views:
9
>>I have the following:
>>
>>DEFINE CLASS cChangeAcct AS Session
>>
>>PROCEDURE Init
>>   SET MULTILOCKS ON
>>ENDPROC
>>
>>PROCEDURE MakeChange ( tcOld, tcNew)
>>
>>   * ... verification of parameters
>>
>>   This.UseTable("TableA")
>>
>>   * ... processing table
>>
>>ENDPROC
>>
>>PROCEDURE UseTable (tcTableName)
>>
>>   USE (tcTableName) IN 0 SHARED
>>   lSuccess = CURSORSETPROP("Buffering", 5, tcTableName)
>>   MESSAGEBOX(VARTYPE(lSuccess)+TRANSFORM(CURSORGETPROP("Buffering",tcTableName))+SET("Multilocks"))
>>   * Messagebox displays U1ON, suggesting the follwing:
>>   *   The CURSORSETPROP command failed
>>   *   The buffer mode of the table is 1
>>   *   Set MultiLocks is On
>>
>>ENDPROC
>>
>>ENDDEF
>>
>>
>>I'm using VFP8, and I'm not seeing the culprit here. Do I have a problem with my CursorSetProp command ?
>>
>>Thanks,
>>
>>Tracy
>
I don't see how you can be returning a "U" for the VARTYPE of lSuccess, it's created right before you show it. Try using TYPE("lSuccess") instead and see if you get the same results. It almost looks like your CURSORSETPROP command did not even execute, let alone fail. It could be that CURSORSETPROP is expecting a table alias, not a table name.

Here's the real culprit. I had an ERROR Procedure in the DEFINE Session that I was not using. It was just there. I failed to catch that for another 20 or 30 minutes as to why the same exact code would work in one code defined class but not the other.

Tracy
Tracy
Previous
Reply
Map
View

Click here to load this message in the networking platform