02-08-04 01:43 PM
On Tue, 20 Jan 2004 17:43:25 -0700, "Chris"
<chris.tucker@nospampodassoc.com> wrote:
>We have a problem with executing Stored Procedures within a custom
>preprocessor. We recieve a unique constraint error on a field setup as
>such, but that field is being generated using a highly unique number that w
e
>generate using 3 seperate calls to Rand function. Yet it apears to be
>duplicating this value. In some ways it even apears that it is duplicating
>the entire transaction that it is executing.
This sounds like a programming-issue to me.
Which programming language are you using?
Most programming languages have a random-function to generate" random"
numbers. But the generated numbers aren't random at all. What happens
is that he random function must calculate the next number to return.
It does this on the basis of some start-value. Unless you change this
value, the random-function will return the exact same number the first
time you call it in code as it did the last time you called it the
first time. (This text is getting messed up :-)
Anyway, most programming languages have a randomize function that will
set the start-value for the random-function based on the system-clock
or something like that - to make it another start-value than the last
time it was called.
Look at the manual for your programming language and see if it has
something like this. Or perhaps let ud know which language you are
using, so we can help you. Final solution is to use a newsgroup
specific for your programming language.
Good luck
--
Jan Eliasen, representing himself and not the company he works for.
MCP in Microsoft BizTalk Server
[ Post a follow-up to this message ]
|