3

I have two schemas. I want to check if the value (e.g. ID) in first schema exists in the second one. If it exists then update the record else insert the record into the second schema.

How can this be done in BizTalk Server 2010 with SQL Server 2008 R2?

p.campbell
  • 98,673
  • 67
  • 256
  • 322
Bilal Saeed
  • 603
  • 2
  • 10
  • 24

1 Answers1

3

If you want to lookup a value in SQL Server from inside a BizTalk Map, then you can use the Database Lookup Functoid.

If you want to lookup something in a database without using a map, then you can use the BizTalk adapter for SQL Server from within an orchestration, as described here, to SELECT the data from SQL.

The values in each "schema" (really, I mean in each message), should be either promoted properties or distinguished fields, which will allow you to access and set them directly from within your orchestration.

schellack
  • 10,144
  • 1
  • 29
  • 33
  • Never use the database lookup functoid. It's buggy, creates difficult to understand code, and performance is terrible (just run a sql profile while executing the map). It should never have been included in the mapping tool. – tom redfern Jul 23 '12 at 06:52
  • Thanks hugh but, what is alternate for lookup functoid then? By the way, I'm able to do a simple task in 3hours using this functoid! :$ – Bilal Saeed Jul 23 '12 at 09:02