How do I convert datasets?

From: Ai (Larry.Brooks_at_CheckAssist.com)
Date: 01/22/04


Date: Thu, 22 Jan 2004 09:03:24 -0600

We are converting an application from a 2-tier to a 3-tier implementation.
The business logic needs to reside in a COM+ middle tier. I need to access
the busines logic from desktop applications as well as legacy ASP pages. How
can I convert an ApolloTable to an ADO Recordset? Following is working code
for SQL Server:

function TcoAdmin.GetSQLData(const cn, sql: WideString): OleVariant;
var
  qry : TAdoQuery;
  rs : _Recordset;
begin
  try
    qry := TAdoQuery.Create(nil);
    qry.ConnectionString := cn;
    qry.SQL.Clear;
    qry.SQL.Add(sql);
    qry.Open;
    rs := qry.Recordset._xClone;
    Result := rs;
    qry.Close;
  finally
    if Assigned(qry) then qry.Free;
  end;
end;



Relevant Pages

  • Re: how to get both old and new value for a changed text box
    ... Access clients and another for SQL Server clients. ... form sends requests for adding and updating records to the middle tier ... accomodate ANY db this way, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: how to get both old and new value for a changed text box
    ... Access clients and another for SQL Server clients. ... form sends requests for adding and updating records to the middle tier ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Balancing security needs in ADO.NET applications
    ... Create Views that return focused subsets of the tables as needed by the applications, but do not grant "write" access. ... Hitchhiker's Guide to Visual Studio and SQL Server ... It's simple enough to give the user logon credentials on ... Or maybe write a "middle tier" that alone interacts with the SQL Server. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Biztalk MessageBox SQL Server logs
    ... on the SQL Server where the BizTalk databases (MsgBox) reside. ...
    (microsoft.public.biztalk.general)
  • Re: distributed transaction problem
    ... > Could you give us some more details about your middle tier code? ... > connecting to SQL with enlist=true in the SQL Connection String or are you ... >> server to a SQL Server. ...
    (microsoft.public.dotnet.framework.component_services)