Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor Adapter/ ca builder help
Message
De
22/09/2003 04:53:07
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
21/09/2003 22:33:19
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00830964
Message ID:
00830996
Vues:
17
John,
I think the problem is with continuation lines. Remove ; from SQL expression.
PS: While text..endtext embeds CRLF and it serves as separator between words, to me textmerge usage provides a better layout. ie:
set textmerge to memvar lcText noshow
set textmerge on
\\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
set textmerge to
set textmerge off
SQL has typo (ea ?).
Cetin

>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)
>
>
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform