Hi Mike

Thanks for the thumbs up..

The problem is that AFAIK only the selects - either direct or using the
SQLExecDirect inside a Basic program - seem to return actual datasets. I
haven't tried it but I suspect that using a regular execute of a SELECT will
only produce the output in string format, not as a dataset. It always did
under OleDB, which is why the SQLExecDirect() is such a useful function. In
fact, it's a useful way to generate and parse data anyway for popups,
listings etc outside of the SQL APIs - hmm now that sounds like another
article <grin>.

On the .Net side, you're not limited to datasets for binding. You can bind
most controls (e.g. gridview) to a typed collection like a List<MyType>. If
you want to get more fancy you can bind through an ObjectDataSource though
that means wrapping your List<MyType> into a class that will provide select,
update and insert methods. These are being used quite heavily for mainstream
three tier solutions where the business layer is split off from the data
access tier, so your web guys should be comfortable with that.

Of course, parsing string data is a pain so I would probably wrap the
non-selectable data into a simple XML format in Basic using some form of
template - which should be quick, it's what Basic is good at. Then use LINQ
on the .Net side to parse it into an IEnumerable collection. Now that's a
buzzword-compliant sentence.

It's all additional work, but that's .Net for you.. never takes the easy
road if it can really overcomplicate things. 

Brian  

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Mike Randall
> Sent: 11 June 2008 03:11
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] New .Net data provider
> 
> Brian,
> 
> Once again, great article.   One thing that I'm still trying 
> to work around is the SQL select.  I've got programs where I 
> apply logic to the data before it's returned to my .Net app.  
> What I had been doing is building arrays of 'massaged' 
> records and passing that back as string parameters and then 
> parsing it in .Net.   That slows down the .Net developers 
> because they can't just bind the data directly to controls.   
> Since I already have the data that I want in arrays,  have 
> you found any to return that as a dataset (maybe a formlist 
> or something) short of writing it to a temp table and 
> selecting it via SQL?
> 
> Another thing I was curious about but didn't try yet is 
> rather than the SQLExecDirect, will an execute of SQL syntax 
> work (EXECUTE "SELECT * FROM TABLE;")?
> 
> Mike Randall,  MCP
> 
> 
> 
>  
>  
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Brian Leach
> Sent: Tuesday, June 10, 2008 3:43 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] New .Net data provider
> 
> Mike
> 
> Read my article on the .Net data provider in Spectrum :)
> 
> You can download PDF versions from http://www.intl-spectrum.com
> 
> Regards
> 
> 
> Brian
> 
> 
> 
> 
> Anybody out there trying to use the new .Net Data Provider?   
> We seem to be
> having quite a time finding documentation and getting 
> answers.   The key
> area where we are having issues getting answers is returning 
> datasets from
> UniBasic programs.   With the new driver installed,  BASIC 
> programs are
> called like SQL stored procedures yet the driver doesn't seem 
> to support a dataset/recordset object type.
> 
>  
> 
> I'm hoping SOMEBODY else is using this stuff beside me.    Right?
> 
>  
> 
> Mike Randall,  MCP
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to