Re: Filename with Incrementing Counter

Home Page Forums BizTalk 2004 – BizTalk 2010 Filename with Incrementing Counter Re: Filename with Incrementing Counter

#25717

Hi,

In one of my projects we implement such pattern: we need a unique number, which is build of three groups. AA BBB CCCCCCC,

Where AA is some process type, BBB subprocess type, CCCCCCC – is autoincremental number.

When I need this number – I pass as parameters AA and BBB, and in stored procedure call to another stored procedure which inserts dummy value to table for autoincrement. (Also you can delete that row after getting number). The autoincremented number is 7 digits.

When I get that number, I convert is to string, and both received parameters are concatenated (not to get added mathimatically, i.e. 123 45 I want as 12345 and not 168) as strings too. The resullt I convert back to BIGINT (long in .Net, Int64 in BizTalk).

By this practice I get uniquie numbers, easily and managed. When you create your file – just let this number to be name of your file. If you need to give string name – instead of numeric parameters – add strings.