Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter Builder Issue
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
CursorAdapter Builder Issue
Divers
Thread ID:
00869241
Message ID:
00869241
Vues:
65
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


VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)


www.wulfsden.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform