Re: BizTalk 2004 :: Fact retriever :: more than 1 data connection? How?



Simply create and assert more than one dataconnection. If you are using the
same database, you can reuse the SqlConnection like so:

DataConnection dc1 =
> new DataConnection("foo", "fum", con1);
> Dataconnection dc2 = new DataConnection("bar", "bum", con1);
> engine.Assert(dc1);
engine.Assert(dc2);

It is not the return value that gets entered intot the engine for execution,
the factsHandleOut is your handle to know whether to refresh the facts. This
is a little confusing, I know and it is a shame that most samples show the
connection being handed back.

You can also create another sql connection, wrap it with the second data
connection and assert that. Similarly, if you are asserting
datatable/datarow facts, you can use the sql connection to retrieve those
and assert them.

Matt



"BA" <biztalk.architect@xxxxxxxxx> wrote in message
news:1116329399.521056.291710@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hello,
>
> In the code below you set a single data connection for a single DB
> table.
>
> I have many data connections to add, how do you extend this sample to
> add more than 1 data connection?
> public class DbFactRetriever : IFactRetriever
> {
>
> public object UpdateFacts(RuleSetInfo rulesetInfo,
> Microsoft.RuleEngine.RuleEngine engine,
> object factsHandleIn)
>
> {
> object factsHandleOut;
>
> SqlConnection con1 = new
> SqlConnection("Initial Catalog=foo;
> Data Source=(local);Integrated Security=SSPI;");
>
> DataConnection dc1 =
> new DataConnection("foo", "fum", con1);
>
> engine.Assert(dc1);
> factsHandleOut = dc1;
> }
> return factsHandleOut;
> }
>
>
> I'm still learning C# so any help would be greatly appreciated.
>
> Thanks!
>
> BA
>


.



Relevant Pages

  • Re: BizTalk 2004 :: Fact retriever :: more than 1 data connection? How?
    ... I thought "no way its just the assert statement that the engine cares about" ... > samples show the connection being handed back. ... >> In the code below you set a single data connection for a single DB ...
    (microsoft.public.biztalk.general)
  • Re: Adacrypt.com - Article
    ... operational for Clifford to assert it. ... They are fining via aware, ... in connection with gigantic wheats. ...
    (sci.crypt)
  • Re: the "Family SURPRISE plan"
    ... an advertised feature on most Cingular phones and requires a data connection ... The actual language used on a couple of the phones is "Downloadable ... to recap- the phone is advertised as capable of downloading ringtones as ...
    (alt.cellular.cingular)
  • Re: HELP - HELP - HELP
    ... you can use Windows authentication. ... I'm trying to set a data-driven Web page with a GridView control. ... Created a data connection using Database Explorer. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: HELP - HELP - HELP
    ... I'm trying to set a data-driven Web page with a GridView control. ... Created a data connection using Database Explorer. ...
    (microsoft.public.dotnet.framework.aspnet)

Loading