Showing posts with label requirement. Show all posts
Showing posts with label requirement. Show all posts

Monday, March 19, 2012

How can i lock a record

hi all iam working on a ticketing application i want to avoid two users to book the same ticket the requirement is as follows

1. the system should show all the available tickets which is not yet booked

2.when two users book the ticket at the same time time it should not allow the two persons to update at the same tme

the main aim is to avoid data concurency

how can i get this done

Use a flag or the best is to use time-stamps?

|||

Hi,

From your description, it seems that your problem is related to SQL concurrency issue.
Suppose each ticket is saved in your data table. For your first requirement, it can be achieved by using a flag which indicates if the ticket has been booked or not.
For your second requirement, since ADO.NET uses Optimistic Concurrency. Then locks are set and held only while the database is being accessed. The locks prevent other users from attempting to update records at the same instant. The data is always available except for the exact moment that an update is taking place.

In Optimistic Concurrency, there are two general ways to determine if changes have occurred: the version approach (true version numbers or date-time stamps) and the saving all values approach.

i.e. For Version Number approach, the record to be updated must have a column that contains a date-time stamp or version number. The date-time stamp or a version number is saved on the client when the record is read. This value is then made part of the update.

For more information, seehttp://msdn2.microsoft.com/en-us/library/cs6hb8k4(VS.71).aspx

Thanks!

Wednesday, March 7, 2012

how can i give customize dataset to sql report

hi
i am new to sql reporting service, i am using for financial reporting,
in one of my requirement i have to calculate how much year customer's fund
will last and i have to show each year's balance.
in crystal report i get directly assign dataset, but how can i
assign dataset in reporting service, plz so urgentIn SSRS, you can assign an application dataset to server-based report only
if you use a custom dataset extension. In your case, I will gravitate toward
performing the data manipulation at the data source level, e.g. inside a
stored procedure. If you use SQL Server 2005 as a data source, consider
using a CLR stored procedure.
I demonstrate how this could be done in this code sample
(http://www.prologika.com/downloads/Pass/). The report invokes a CLR stored
procedure that uses data mining for sales forecasting.
As a side note, for financial reporting, I strongly suggest you evaluate
Analysis Services especially if you need to support account charts where
values substract or add (income, expenses, etc). Otherwise, you may find
yourself reinventing the wheel. I know from personal experience.
HTH
--
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Lovenish" <Lovenish@.discussions.microsoft.com> wrote in message
news:CE811BDF-1C05-4C34-9853-166E60A39D65@.microsoft.com...
> hi
> i am new to sql reporting service, i am using for financial reporting,
> in one of my requirement i have to calculate how much year customer's fund
> will last and i have to show each year's balance.
> in crystal report i get directly assign dataset, but how can i
> assign dataset in reporting service, plz so urgent|||Thx Teo Lachev,
but the code you have send is i think in visual studio 2005, i am
using 2003. so can u help me further,
u were talking about customize dataset extension but i cant get how to use
this so plz plz help me