﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » Enterprise Server - V1 » How do I?  » Standard ADO.Net components works with ES?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 13 May 2026 05:16:03 GMT</lastBuildDate><ttl>20</ttl><item><title>Standard ADO.Net components works with ES?</title><link>http://forum.strataframe.net/FindPost26695.aspx</link><description>Hi,&lt;br&gt;
&lt;br&gt;
I´d like to know if the code below works when I using a ES connection.&lt;br&gt;
&lt;br&gt;
Tks&lt;br&gt;
&lt;br&gt;
[quote]con = New SqlConnection(sConnectionString)&lt;br&gt;
con.Open()&lt;br&gt;
ds = New DataSet()&lt;br&gt;
sSql = "select cli_campo01, cli_campo02, cli_classe, cli_nome from tb_cliente "&lt;br&gt;
dap = New SqlDataAdapter(sSql, con)&lt;br&gt;
Dim dt = New DataTable()&lt;br&gt;
dap.Fill(dt)&lt;br&gt;
If dt.Rows.Count &gt; 0 Then&lt;br&gt;
   dim campo1 as string = dt.Rows(0).Item("server_cliente")&lt;br&gt;
   dim campo2 as string = dt.Rows(0).Item("db_cliente")&lt;br&gt;
   classe_cliente = dt.Rows(0).Item("cli_classe")&lt;br&gt;
   nome_cliente = dt.Rows(0).Item("cli_nome")&lt;br&gt;
end if&lt;br&gt;
[/quote]</description><pubDate>Mon, 12 Apr 2010 09:25:30 GMT</pubDate><dc:creator>Luiz Lima</dc:creator></item><item><title>RE: Standard ADO.Net components works with ES?</title><link>http://forum.strataframe.net/FindPost26816.aspx</link><description>Great job, Greg.  Thanks for the samples! :)</description><pubDate>Mon, 12 Apr 2010 09:25:30 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Standard ADO.Net components works with ES?</title><link>http://forum.strataframe.net/FindPost26801.aspx</link><description>I just posted a sample demonstrating how you might do this.&lt;br&gt;
&lt;br&gt;
[url]http://forum.strataframe.net/FindPost26800.aspx[/url]</description><pubDate>Fri, 09 Apr 2010 14:45:11 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Standard ADO.Net components works with ES?</title><link>http://forum.strataframe.net/FindPost26784.aspx</link><description>Oops. I haven't done this in a while.  You have actually build a BO using the BO mapper so all the required override properties are handled. I guess a better way of expressing this is to say that you can use any BO to generically retrieve data. I'm working on an example which should be done tomorrow.</description><pubDate>Thu, 08 Apr 2010 21:46:02 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Standard ADO.Net components works with ES?</title><link>http://forum.strataframe.net/FindPost26776.aspx</link><description>Greg,&lt;BR&gt;&lt;BR&gt;Sorry by late.&lt;BR&gt;I tested the code but I´ve got an error about override TableName, how can I do that?&lt;/P&gt;&lt;P&gt;See the screen shot&lt;/P&gt;&lt;P&gt;&lt;BR&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/930203d2-7e69-4dbd-b3c2-dd3b.JPG"&gt;&lt;/P&gt;&lt;P&gt;tks&lt;/P&gt;&lt;P&gt;Luiz</description><pubDate>Thu, 08 Apr 2010 12:45:41 GMT</pubDate><dc:creator>Luiz Lima</dc:creator></item><item><title>RE: Standard ADO.Net components works with ES?</title><link>http://forum.strataframe.net/FindPost26713.aspx</link><description>Not sure about that, but it might be possible. I'm not sure how the BBS does its "magic", if it uses the field properties or just whatever datatable is loaded into the BO.  If it's just using the data table, then I'm guessing this would work.</description><pubDate>Wed, 31 Mar 2010 12:13:44 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Standard ADO.Net components works with ES?</title><link>http://forum.strataframe.net/FindPost26712.aspx</link><description>Greg,&lt;BR&gt;&lt;BR&gt;Fantastic!&lt;BR&gt;I didn´t know the use of generic BO, this open a large of possibilities to me.&lt;BR&gt;Can I use this generic BO with Business Binding Source?&lt;/P&gt;&lt;P&gt;Tks!</description><pubDate>Wed, 31 Mar 2010 10:01:45 GMT</pubDate><dc:creator>Luiz Lima</dc:creator></item><item><title>RE: Standard ADO.Net components works with ES?</title><link>http://forum.strataframe.net/FindPost26703.aspx</link><description>As far as I know, no it won't. It only deals with BOs. I know when I started using ES, I had to redo a couple of things that were using ADO.NET directly.&lt;br&gt;
&lt;br&gt;
Note that you can use a generic BO, or even the BusinessLayer directly to get a Datatable filled:&lt;br&gt;
&lt;br&gt;
[codesnippet]'-- Use a generic BusinessLayer to fill a datatable and get some arbitrary data.&lt;br&gt;
Dim campo1 As String = String.Empty&lt;br&gt;
Dim campo2 As String = String.Empty&lt;br&gt;
Using bo As New BusinessLayer()&lt;br&gt;
&amp;nbsp;&amp;nbsp;'-- Set data source key, so it can find data.&lt;br&gt;
&amp;nbsp;&amp;nbsp;bo.DataSourceKey = ""&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;'-- Fill BO's data table using a SQL command...could just use the String overload&lt;br&gt;
&amp;nbsp;&amp;nbsp;'&amp;nbsp;&amp;nbsp;&amp;nbsp;but if you are passing params, then this is the way to go.&lt;br&gt;
&amp;nbsp;&amp;nbsp;Using cmd As New SqlCommand()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cmd.CommandText =  "select cli_campo01, cli_campo02, cli_classe, cli_nome from tb_cliente "&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bo.FillDataTable(cmd) &lt;br&gt;
&amp;nbsp;&amp;nbsp;End Using&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;'-- If there are any items, load data. It'll be on the first row by default.&lt;br&gt;
&amp;nbsp;&amp;nbsp;'&amp;nbsp;&amp;nbsp;&amp;nbsp;If you need to move to another row, BO has methods to get this done.&lt;br&gt;
&amp;nbsp;&amp;nbsp;If bo.Count &gt; 0 Then&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;campo1 = Ctype(bo.CurrentRow("server_cliente"), String)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;campo2 = Ctype(bo.CurrentRow("db_cliente"), String)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;classe_cliente = Ctype(bo.CurrentRow("cli_classe"), String)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nome_cliente = Ctype(bo.CurrentRow("cli_nome"), String)&lt;br&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br&gt;
End Using[/codesnippet]</description><pubDate>Tue, 30 Mar 2010 19:59:40 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>