Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapter Builder Issue
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00869241
Message ID:
00875928
Views:
28
Done! I just put up the new revised version.

http://www.mctweedle.com/downloads/cabuilder.zip

>Hi Mark,
>
>I discovered the following scenario which causes the caBuilder to error out:
>
>One of the SQL Server tables in a DB we have contains just two fields, Account_ID and Group_ID, both of which make up the primary key. When the caBuilder tries to generate the class, it crashes when trying to write the _CA_DMLCode method.
>
>During Cr8_DMLCode(), since the only two fields in the table both end up being in the excluded list (henced looped over), the first parts of lcInsert and lcUpdate never get created which results in orphaned ENDTEXT blocks:
>
>#DEFINE VFP_CRLF CHR(13) + CHR(10)
>
>LOCAL lcInsertCmd, lcUpdateCmd, lcDeleteCmd, lcSchema
>
>TEXT TO lcSchema NOSHOW PRETEXT 2
>	ACCOUNT_ID I,
>	GROUP_ID I
>ENDTEXT
>lcSchema = STRTRAN(lcSchema, VFP_CRLF, [ ])
>
>)
>)
>ENDTEXT
>lcInsertCmd = STRTRAN(lcInsertCmd, VFP_CRLF, [ ])
>
>
>	where ACCOUNT_ID = ?crsSecurity_user_group.ACCOUNT_ID AND GROUP_ID = ?crsSecurity_user_group.GROUP_ID
>ENDTEXT
>lcUpdateCmd = STRTRAN(lcUpdateCmd, VFP_CRLF, [ ])
>
>TEXT TO lcDeleteCmd NOSHOW PRETEXT 2
>	delete from security_user_group
>	where
>	ACCOUNT_ID = ?crsSecurity_user_group.ACCOUNT_ID AND GROUP_ID = ?crsSecurity_user_group.GROUP_ID
>ENDTEXT
>lcDeleteCmd = STRTRAN(lcDeleteCmd, VFP_CRLF, [ ])
>
>WITH THIS
>	._BuildSelectCmd()
>	.DeleteCmd = lcDeleteCmd
>	.InsertCmd = lcInsertCmd
>	.UpdateCmd = lcUpdateCmd
>	.CursorSchema = lcSchema
>ENDWITH
>
>
>
>Could you put this on the caBuilder wish list? :)
>
>Thanks,
>
>- Brian
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform