hey guys, quick question that i hope someone can help steer me in the correct direction.
i've got a failry large report that gets its data from and XML web service.. the dataset that the webservice returns has 6 tables in it (i'm interested in data from 5 of them).. in order to get my fields to show up correctly in my dataset viewer i've created 5 datasets and use the ElementPath in my query to single out the table i want for each dataset.. this works fine about 50% of the time.. the other 50% of the time it craps out on my because some of the data manipulation that the webservice does causes primary key violations.. is the report making 5 calls to the webservice? if it is, is it sending them in multiple threads.. its the only thing i can think of that would cause my key violations..
my sproc that is dying looks similar to this:
delete from dbo.Charges where contractid = @.contract
insert into dbo.charges (columns.....) values (values)
i can see that it would violate the key if both threads were doing the insert simultaneously(sp)..
now.. is there a way to only make one trip to the webservice and use those results in the report, while still having the fields available in the dataset viewer?
thanks
mike
Yes, RS will execute each DataSet in its own thread if the DataSource is not marked to use a transaction. If your RS DataSource is set to execute in a transaction each DataSet will be executed in order in the same thread. In report designer, you can mark a DataSource to use a transaction by checking the "Use single transaction" box in the Data Source dialog.
However, even if all your DataSets are executed in the same thread, each DataSet will still make a seperate call to the web service to retrieve the data.
John
|||thanks John.. it works as expected now.. is there anyway that i could prevent all the calls to the webservice? ie have a main dataset with all the tables, then pass that dataset to a subreport for each section that uses a specific table?
thanks again for the quick reply
mike