I have created a website which I am hosting using
IIS. I have just discovered that if two people are accessing the site
at the same time, they are sharing the DATA . Does anyone have any suggestions ??..... Thanks!
Below is my table structure ::
CREATE TABLE [dbo].[Temp_PurchaseBill](
[ITEMCODE] [varchar](50) NULL,
[ITEMDESCRIPTION] [varchar](100) NULL,
[BRAND] [varchar](50) NULL,
[BatchNo] [varchar](20) NULL,
[ExpiryDate] [datetime] NULL,
[ITEMUNIT] [varchar](50) NULL,
[PURCHASERATE] [numeric](12, 2) NULL,
[MRP] [numeric](12, 2) NULL,
[QTY] [numeric](12, 2) NULL,
[PackQTY] [numeric](12, 2) NULL,
[FreeQTY] [numeric](12, 2) NULL,
[StockQTY] [numeric](12, 2) NULL,
[VATOn] [varchar](30) NULL,
[ITEMRATE] [numeric](12, 2) NULL,
[MRPRATE] [numeric](12, 2) NULL,
[VatPercentage] [numeric](12, 2) NULL,
[VatTotal] [numeric](12, 2) NULL,
[FreeVatAmt] [numeric](12, 2) NULL,
[TaxScheme] [varchar](30) NULL,
[DiscountOption] [varchar](30) NULL,
[DiscPer] [numeric](12, 2) NULL,
[DiscTotal] [numeric](12, 2) NULL,
[TotalAmount] [numeric](12, 2) NULL,
[BillNO] [varchar](20) NULL,
[BillDate] [datetime] NULL,
[MrpAbate] [numeric](12, 2) NULL,
[VatOptions] [varchar](50) NULL,
[TaxType] [varchar](50) NULL,
[IPAddress] [varchar](50) NULL
) ON [PRIMARY]
in IPAddress column I am getting IPaddress of a client system. Even though , the table gets clashed ... Any idea frnds...Its URGENT....
Please Help me...Thanks in advance
Loading
Akkiraju IvaturiPosted Aug 22, 2012, 10:21 AM
Have a integer, identity column in the table and make it primary key. So, whenever you enter a bill information first it should save a record in the database on form opening and get you back the id (primary key) of your transaction and store this id in your form. While saving the data, you need to use the id and update the other information. This will make sure that no two user's data gets clubbed or clashed any time.
Alter table temp_purchsebill add ID int identity(1,1) not null
sathish kumarPosted Aug 22, 2012, 1:23 AM
Any idea brother......
Akkiraju IvaturiPosted Aug 21, 2012, 10:37 PM
Sukesh MarlaPosted Aug 21, 2012, 1:35 PM
What if they are sharing the data,I am not getting whats the point.
sathish kumarPosted Aug 21, 2012, 7:21 AM
Sukesh MarlaPosted Aug 21, 2012, 6:12 AM
Hope this helped, Check this is correct answer if it is.