Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor Adapter/ ca builder help
Message
De
23/09/2003 08:43:11
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
À
23/09/2003 05:14:43
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00830964
Message ID:
00831415
Vues:
19
I told you, they are not real table names.... the real sql works in the command window but not in the adapter. Can we not focus on the typo but on a solution?



>>>
>>>>In the following code, the sql statement keeps getting chopped before the end. I have tried everything I can think of, iincluding stringing it all together and removing the aliases. It sill is to long. Can anybody offer any suggestions on getting this sql statement into the cursor adapter so that it will fill the cursor.
>>>>
>>>>I am also using Mark McCasland's cabuilder program. It is a wonderful tool. Thanks Mark.
>>>>
>>>>
>>>>
>>>>WITH this
>>>>	IF .LoadDE()
>>>>		.cSQL 		 = .GetSQL()
>>>>		.cSQLFilter  = .GetSQLFilter()
>>>>		.cSQLOrderBy = .GetSQLOrderBy()
>>>>		WITH .oDE
>>>>			.AddAdapter(this.caName, this.caName, .F.,;
>>>>  this.cSQL, this.cSQLFilter, this.cSQLOrderBy)
>>>>		ENDWITH
>>>>	ENDIF
>>>>	.CreateList()
>>>>ENDWITH
>>>>
>>>>
>>>>******************************************
>>>>**-- addadapter method
>>>>LPARAMETERS tcName, tcAdapter, tlNoLoad, tcSQL, tcFilter, tcOrderBy
>>>>WITH this
>>>>	.AddObject(tcAdapter, tcAdapter)
>>>>	IF NOT tlNoLoad
>>>>		WITH .&tcName	
>>>>			.cBaseSelectCmd   = EVL(tcSQL, .cBaseSelectCmd)
>>>>			.cSelectCmdFilter = EVL(tcFilter, .cSelectCmdFilter)
>>>>			.cSelectOrderBy   = EVL(tcOrderBy, .cSelectOrderBy)
>>>>			.CursorFill()
>>>>		ENDWITH
>>>>	ENDIF
>>>>ENDWITH
>>>>	
>>>>
>>>>******************************************
>>>>**--GetSQL Method
>>>>LOCAL lcText
>>>>
>>>>TEXT TO lcText NOSHOW PRETEXT 7
>>>>	SELECT DISTINCT st.abbr, st.name, ea.state_id, st.default ;
>>>>		FROM table1 t1;
>>>>			LEFT JOIN table2 t2 ON t2.record_id = t1.record_id ;
>>>>			LEFT JOIN table3 t3 ON t3.record_id = t2.record_id ;
>>>>			LEFT JOIN table4 t4 ON t4.record_id = t3.record_id ;
>>>>			LEFT JOIN states st ON st.record_id = t4.state_id
>>>>ENDTEXT
>>>>RETURN ALLTRIM(lcText)
>>>>
>>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform