Hi Tracy,

I bought the $19 FlexCubed FlexSQL, which uses a SWC and a server-side asp 
which I place in wwwroot/website. Talked to them and they do not support procs 
.... deadline means having to embed while look for proc solution. They pass the 
e.g. select statement to their SWC as a string, and my select statements are 
basically the proc contents so pretty long - nightmare without the indents and 
lines normally associated with sql formatting :-)

I grabbed the FlexSQLAdmin google code open source - I cannot get it passed the 
SharePoint security - been talking to him but he is not "Sharepoint aware".

The more I look at SharePoint and asp.net etc the more I appreciate my attempt 
to write this app in Flex and embed into SharePoint page :-) I think probably 
MS is positioning Silverlight to code RIAs inside SharePoint?

Mic

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <tspr...@...> wrote:
>
> User the "\n" sequence to insert newlines in a string.
> 
>  
> 
> How are you communicating with SQLServer?  You should be aware that using
> native http has security consequences.  So does allowing dynamic sql.  You
> would do better to use a server side process to integrate with the database.
> 
>  
> 
> Tracy Spratt,
> 
> Lariat Services, development services available
> 
>   _____  
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Mic
> Sent: Monday, April 13, 2009 12:12 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] How to put a well-formatted SQL statement in a string?
> 
>  
> 
> 
> 
> 
> 
> 
> I have to embed my SQL within Flex until I can work out how to call a
> SQLServer proc from within Flex (any pointers here would be much
> appreciated), and am writing functions:
> 
> private function sel_mrkt_pln_yrs(p_string:String = null):String{
> var sqlString:String = "select distinct issue_yr, cast(issue_yr as Int) as
> ID from MKT_PLN where (case when " + p_string + " is not null then case when
> mkt_pln_typ = " + p_string + " then 1 end else 1 end) = 1 order by 1 desc;";
> 
> 
> return sqlString; 
> }
> 
> I would like to format the SQL so I can read it:
> 
> select distinct
> issue_yr,
> cast(issue_yr as Int) as ID
> from
> MKT_PLN
> where
> (case when @p_mkt_pln_typ is not null then
> case when mkt_pln_typ = @p_mkt_pln_typ then
> 1
> end
> else
> 1
> end) = 1
> order by
> 1 desc;
> 
> but var sqlString:String = ... will not take the separate lines etc. How are
> people doing this? TIA,
> 
> Mic.
>


Reply via email to