How Can I Reserve A Record To Prevent Anyone Else From Editing For X Minutes?
Nov 30, 2006
Hey All,
I think this is something like locking, but not quite. I need to select a record in a database and display the information to the end user. The end user has a few minutes to review it before giving the ok at which point I will update the record.
However, while the user is reviewing the record, i dont want anyone else to be able to grab that record. I also want to make sure that if the user doesnt submit the page, that the record will be freed up and not indefinitely marked as taken.
What would be the best way to do this? This is with .net 2.0 and sql2000
View 2 Replies
ADVERTISEMENT
Jun 12, 2012
I need to calculate changes in reserve from the initial reserve calculation as seen in the diagram below. The initial reserve is derived from 1000-100 = 900. Next 900-50 = 850, 850-150 = 700 and so on.
Before:
ClaimidtotalincurpaymentreserveRownumber
123410001009001
123410005002
1234100015003
1234100015004
12352000100010001
1235200010002
1235200015003
After:
ClaimidtotalincurpaymentreservesRownumber
123410001009001
12341000508502
123410001507003
123410001505504
12352000100010001
123520001009002
123520001507503
View 2 Replies
View Related
Feb 4, 2007
can someone help me why it produces an error....
error is: ERROR 22001 Microsoft ODBC SQL Server Driver SQL Server STRING or data of BINARY was cut short. ERROR 01000 Microsoft ODBC SQL Server Driver SQL Server statement was ended.
This is my code here for editing a record....
Protected Sub Button_save2_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_save2.Click '||||| Create string connection Dim StrConn As String = "Dsn=MS_PKG01;UID=emiline;APP=Microsoft® Visual Studio® 2005;WSID=MSHNP200603;DATABASE=MS_PKG01;Trusted_Connection=Yes" '||||| Create connection object Dim MyConn As Odbc.OdbcConnection = New Odbc.OdbcConnection(StrConn)
'||||| Open connection MyConn.Open()
'|||| Create odbcCommand object Dim Update_record As New Odbc.OdbcCommand("UPDATE TM0001 SET TM0001.syain_name = ?, TM0001.syain_pass = ?, TM0001.office_id = ?, TM0001.birth_date = ?, TM0001.empl_date = ?, TM0001.user_iden = ? ", MyConn)
Dim hireYear As String Dim hireMonth As String Dim hireDay As String Dim date_hire As String
hireYear = DropDownList_hire_yr.Text hireMonth = DropDownList_hire_mo.Text hireDay = DropDownList_hire_day.Text
date_hire = hireYear + "/" + hireMonth + "/" + hireDay
'|||| Add command parameters Update_record.Parameters.Add("@P1", OdbcType.Char, 8).Value = TextBox_id.Text Update_record.Parameters.Add("@P2", OdbcType.Char, 20).Value = TextBox_name.Text Update_record.Parameters.Add("@P3", OdbcType.Char, 20).Value = TextBox_pswd.Text Update_record.Parameters.Add("@P3", OdbcType.Char, 40).Value = DropDownList_office.SelectedValue Update_record.Parameters.Add("@P3", OdbcType.Char, 2).Value = date_hire Update_record.Parameters.Add("@P3", OdbcType.Char, 10).Value = TextBox_bday.Text Update_record.Parameters.Add("@P3", OdbcType.Char, 1).Value = DropDownList_iden.SelectedValue
'|||| Execute command Update_record.ExecuteNonQuery()
'|||| Close connection MyConn.Close() End SubEnd Class
View 3 Replies
View Related
Jul 20, 2005
I have some software (written in Delphi 5) which has been working forseveral months without a problem.I have been given a copy of the database on our development server(SQL 7) and have pointed the software to this. So, nothing has changedwith the software. In theory the servers should be the same.However, if I try to make a small change to any record (as I would onthe 'live' system), I get an error stating that another user isediting the record. Now, I'm the only person with access to thisserver. So am I stopping myself I wonder ?If I create an ODBC connection to the database through Access 2000, Iget the same error. I feel I can reasonably assume that the softwareis not at fault.I'm sure it's something SQL based, whether it's an error orconfiguration difference, but I'm stuck.I've checked who is locking/blocking, and yes it will show me ashaving the record open, but this is me attempting to edit the recordso I would expect this.I can edit the table directly in SQL, but it takes 30 seconds or more,freezes EM and then allows the change. Table info below :if exists (select * from sysobjects where id =object_id(N'[dbo].[PostReceived]') and OBJECTPROPERTY(id,N'IsUserTable') = 1)drop table [dbo].[PostReceived]GOCREATE TABLE [dbo].[PostReceived] ([PostID] [int] IDENTITY (1, 1) NOT NULL ,[Type] [varchar] (100) NULL ,[ClientsName] [varchar] (100) NULL ,[DateReceived] [datetime] NULL ,[EnteredBy] [varchar] (100) NULL ,[AssignedTo] [varchar] (100) NULL ,[DateAssignedTo] [datetime] NULL ,[Adviser] [varchar] (100) NULL ,[TargetDate] [datetime] NULL ,[CompletionDate] [datetime] NULL ,[Completed] [bit] NULL ,[KeyAccount] [varchar] (100) NULL ,[Notes] [text] NULL ,[Specific1] [varchar] (20) NULL ,[Specific2] [varchar] (20) NULL ,[Specific3] [varchar] (20) NULL ,[Specific4] [varchar] (20) NULL ,[Specific5] [varchar] (20) NULL ,[ToDelete] [bit] NULL ,[EnterUser] [varchar] (20) NULL ,[Returned] [bit] NULL ,[ReturnDate] [datetime] NULL ,[ReturnReason] [varchar] (87) NULL ,[PrintAdviser] [bit] NULL ,[EmailAdviser] [bit] NULL ,[EmailSM] [bit] NULL ,[EmailRegionManager] [bit] NULL ,[ReturnText] [varchar] (150) NULL) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]GO(Yes I know about using Identity in the key, but it's on my list tochange before anyone says anything).
View 5 Replies
View Related
Mar 25, 2008
Seems that when i use the edit functionality of the formview, and there are NULLs in the record, that my sql update statement (default from the FormView wizard) doesnt work (nothing updates). However, if i populate all fields, everything works fine. I have modified the FormView edit template to add my own textboxes and dropdowns to simplify the user record editing.
Because it works when all fields are populated with non-NULL values, Seems my Bind's are all correct.
---Jim
View 10 Replies
View Related
Jul 9, 2002
I am getting the following error while trying to update a SQL Server 7.0 table thru' MS Access('97 version). It was working fine until now. This problem started happening after re-linking the table to MS Access as new columns have been added on the SQL Server table. We tried re-starting the MS Access,re-linking the table again,giving all the permissions to the user on the table etc. Also, no other user is accessing the table at the same time..Any help?
Error message in MS Access:
This record has been changed by another user since you started editing it. If you save the record, you will overwrite the changes the other user made.
Copying the changes to the clipboard will let you look at the values the other user entered, and then paste your changes back in if you decide to make changes.
thanks,
Mike.
View 1 Replies
View Related
Aug 26, 2005
Hey Guys,I have been trying to work out how I would delete a record that was created more then 10 minutes ago.I can use this to delete records older then a day.DELETE FROM DownloadQueue WHERE Downloading = '0' AND QueuePos = '0' AND DateTime < GETDATE() - 1Just need something now that will do it for just 10 minutes.Cheers.
View 1 Replies
View Related
Sep 8, 2015
I have a table with following data
(Id, date ,time)
11 2015/8/1
12:20:00
11
2015/8/1 12:21:00
11 2015/8/1
18:05:20
12 2015/8/1
11:20:00
12 2015/8/1
11:21:00
12 2015/8/1
18:10:20
I need the table with following record only
(Id, date ,time)
11 2015/8/1
12:20:00
11 2015/8/1
18:05:20
12 2015/8/1
11:20:00
12 2015/8/1
18:10:20
View 7 Replies
View Related
Apr 21, 2015
My table as data as follow,
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[table_Data]') AND type in (N'U'))
DROP TABLE [dbo].[table_Data]
GO
/****** Object: Table [dbo].[table_Data] Script Date: 04/21/2015 22:07:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[table_Data]') AND type in (N'U'))
[code].....
View 6 Replies
View Related
Aug 11, 2006
is there any possibility to reserve page size on sql server 2000 for future update in data page
Thanks in advance
View 1 Replies
View Related
Aug 9, 2004
On an SQL2000 Enterprise Edition with SP3 and 3.2 GB memory, I have restore around 700 databases from backup .bak files with no errors. Now, while in the process to restore (proc to restore with move statement) another 150 databases, following errors are encountered:
-------------------------
There is insufficient system memory to run this query.
WARNING: failed to reserve contiguous memory of size = 196608.
Query Memory Manager: Grants=0 Waiting=0 Maximum=150384 Available=150384
"Buffer Distribution: stolen=6699 Free=280 Procedures=4821 Inram=0 Dirty=1221 Kept=0 I/O=0, Latched=1169, Other=194482"
-------------------------
Is ther memory leaking and/or hardware related? the sql used only 1.8 gb mem and the whole system is using 2.4 gb mem. After reboot, same error appears in the middle of restoring 150 databases.
thanks
-D
View 2 Replies
View Related
Aug 21, 2006
Hi All,
We are trying to read a table name Order through command line SQLcmd.
But it is giving us an error. Order is an SQl2005 reserver word and app programmer created that table who left. No we have problem to read that table through sqlcmd. any ide a how we can do that.
C:>sqlcmd
1> use ACCMedford
2> select * from 'Order'
3> go
Msg 102, Level 15, State 1, Server ACCMedford, Line 2
Incorrect syntax near 'Order'.
1> select * from "order"
2> go
Msg 102, Level 15, State 1, Server ACCMedford,, Line 2
Incorrect syntax near 'order'.
1> select * from order
2> go
Msg 156, Level 15, State 1, Server ACCMedford,, Line 1
Incorrect syntax near the keyword 'order'.
View 6 Replies
View Related
Dec 23, 2002
Hello,
Anybody has came to solution across this error?
We are getting this error repeatedly. I appreciate if anybody give suitable solution for this.
Thanks,
Ravi
Failed to reserve contiguous memory of Size= 65536.
Query Memory Manager: Grants=0 Waiting=0 Maximum=148160 Available=148160
2002-12-23 08:22:01.37 spid87Global Memory Objects: Resource=2547 Locks=72 ...
2002-12-23 08:22:01.37 spid87Dynamic Memory Manager: Stolen=4115 OS Reserved=2096 ...
2002-12-23 08:22:01.37 spid87Procedure Cache: TotalProcs=135 TotalPages=706 InUsePages=703
2002-12-23 08:22:01.37 spid87Buffer Counts: Commited=872064 Target=872064 Hashed=773613...
2002-12-23 08:22:01.37 spid87Buffer Distribution: Stolen=3413 Free=94332 Procedures=706...
View 5 Replies
View Related
Feb 2, 2001
If I have a *.dts file, and want to change the originating server database from SERVERA DB_A to SERVERB DB_B, is there an easy method to do this, besides editing the file in the GUI form?
View 1 Replies
View Related
Jun 16, 2007
I need help transferring a SQL database. I currently have my website database on a SQL 4.0.27 (vdeck) and want to transfer it to a new server (VPS) which has SQL 4.1.2
I have imported the database to my desktop computer. It will not let me import to the new server. I have to edit/reconfigurate.
Any suggestions, comments, advice, help would be greatly appreciated.
Ed
ed.sistrunk@sistrunk.net
View 4 Replies
View Related
Nov 4, 2003
Can I edit database (Tables, SPs, Views,...) with ADO.NET?
View 3 Replies
View Related
Feb 16, 2005
hey guys,
is it possible to add or edit columns once there is data in the tables??
not the data in the columns but the columns themselves..
for example lets say i have a table with 4 columns and for some reason or
another, i want to add a 5th or 6th column after data has already been entered,
like a few months down the line..
View 2 Replies
View Related
Mar 9, 2005
I have scheduled a T-SQL job that runs every morning using Enterprise Manager. Now I want to change the SELECT and UPDATE statements that this job runs, but I can't find anywhere to edit a job that has already been scheduled. Any help would be appreciated.
Thanks
View 1 Replies
View Related
May 6, 2008
I keep getting "cannot update a timestamp column"!! How can I change the timestamp to all zeros? or can I not do that?
JOhn
View 4 Replies
View Related
Nov 16, 2007
Hi
I want to Enable Editing in the GridView
but there is a problem
the GridView take its data from 2 tables and I do this by the
build query
so I can't choose the " advance " button and check for enable update and delete statements
and when I try to build the update query in the update tap
I don't know what to write in the "new value" column
so how can enable editing in the GridView that take from
2 tables???????
please help me
and thanks
View 3 Replies
View Related
Feb 20, 2004
Hi,
I want to get (SELECT??) data from a db (SQL), edit the data (+1) and then update (UPDATE??) the table with the edited value. How do I get the value from the db and then edit it and then update the field in the db?? Does someone has an example so I get on the way??
Thanks,
Roel
View 9 Replies
View Related
Aug 15, 2005
Is there anyway possible to edit table design with data already entered in the table.If not, is there anyway I can cut and paste the info back in. Ive tried importing to access and then back to SQL, however, when i tried to view my table design in ASP.NET webmatrix, it gave me an error.
View 1 Replies
View Related
Mar 18, 2002
I've just created a new maintenance plan (sql2k sp2) and attempted to re-enter it to make a change. right click - choose properities (or double click)...I see the dialog box 'flash' very briefly but it's not making itself available for editing.
I've deleted and recreated the plan ... same result.
I _should be able to edit it, shouldn't I?
thankx
--steve...
View 1 Replies
View Related
Jul 7, 2006
Hi guys
Am i able to deny the SA account access to a specific database?
thanks in advance for your help.
TheGing
View 4 Replies
View Related
Jan 14, 2008
I have a SQL 2000 SP4 server running on Windows 2003 SP2. About 6 months ago I started experiencing problems editing existing DTS packages. At that time it was just 1 package. (I tested that I could edit all others but this one package the first time I experienced the problem.)
But now it seems like anytime we experience import problems, I cannot edit the package so that I can verify that the import file is good. (So far the initial problem is always with the import file and once we figure out what that is and resolve it the package runs ok again.)
The problem is I'm planning on migrating to SQL 2005 and since I can't import DTS packages, I'm going to have to rewrite them as Integration Service Projects. If I can't edit the workflow tasks in DTS, it will be time consuming figuring out what the actual import file is. Also, most of these imports are coming from our AS400 which we are phasing out so I have to rewrite these to work with the new ERP package we are going to as we bring on each division.
I have not installed any post SQL 2000 SP4 hotfixes. So if anyone is aware of a hotfix that resolves this issue, please let me know.
View 14 Replies
View Related
Apr 8, 2004
Hi to all,
We have an application that used Ms-Access for its backend.
We wanted to move up to MSDE so I wrote a conversion utility that creates the SQL database, copies all the data from the Access database, creates all the indexes and relationships.
Now, the application used a lot of sql statements which would have to be rewritten for SQL Server so we decided to create a ms-access database with linked tables to the SQL server (ODBC). Don't tell me not to do that because I have no control over it :).
The weird thing happening now is that:
All the records that were moved from access are fine.
New records can be added fine.
However, when trying to edit/delete the new records, I get an error saying that:
Write Conflict.
I can't change the record because it has been changed by another user since I started editing it.
Any ideas?
Thanks
View 2 Replies
View Related
Apr 28, 2006
I've recently been upgraded to Office 2003 and primaraly use Access to edit SQL stored procedures on a SQL 2000 box.
It seems though from first glance, things have gotten worse since Access 2000.
No more colour coding for example and it also opens some in a view type mode.
Any recomendations on what I can use that would allow me to edit the SQL while updating it on the server and pull down data if needed?
Someone recommened Visual Studio but I'm unsure of which version to use.
View 6 Replies
View Related
Feb 29, 2008
Please direct me towards good documentation about updating, inserting and deleting data using views involving multiple tables.
Thanks
View 2 Replies
View Related
Jul 20, 2005
I have an SP which I use to insert into a table data from another. Forexample...INSERT INTO myWorkTable(Field1, Field2)SELECTmyField1, myField2FROMmyNewTableIt's a pretty straight forward sp. Now, the data that gets insertedseems to have remained in a state that stops me updating it later. TheSP is called by one app which is then closed and not used again untilthe following month. The sp shouldn't be used by anything else.I have another application which goes to the table (in my examplemyWorkTable) and is supposed to open and edit specific records whichit does correctly navigate to (a few days after the sp). It fails andI get an error message stating that the record is being edited byanother user. This record should not be opened by any other process.If I export the data and re-import it into the table, it worksperfectly fine.The code used to edit the table is fine and has worked for a couple ofyears and I'm happy with it. The only change I have made is to use anSP to import the data instead of an old method using Access 2000. Thefunctionality is the same, even though the connection is different.The Delphi app uses BDE.Inserting directly through SQL works as I would have expected and Ican edit the record as I need.I'm guessing that Delphi (which I use for the app) is somehow notfreeing up the data locked by the SP when it finished calling the SP,even when it is closed. However, it seems a little bizarre as I wouldexpect it to free up the data affected by the SP once it has finished(maybe this is the wrong assumption).So, my question is, can an SP lock records in this way ? If so,how/why and can I stop this once finished, or is there a way ofchecking / resetting records which were locked up and should no longerbe this way. I can't see anything obvious which shows the records arelocked, but am willing to delve further.ThanksRyan
View 2 Replies
View Related
Jan 10, 2007
Hi, I need to modify the ModelGenerationRules.smgl file to increase the mandatory filter setting of 5000 records. This is much too small for our database. I know where the file is but I need to know how to make the change. Does anyone know how to change this?
Thanks
BB
View 1 Replies
View Related
Mar 29, 2006
I'm not a "real" programmer. Excuse my ignorance.
I need to edit a stored procedure. I simply want to change the text that it displays. I do not intend to change its function.
I am using SQL Express and SQL Server Management Studio Express. I can select Modify for my stored procedure, but when I save it, it saves it as an SQL file to my hard disk. How do I affect the edits to the actual stored procedure?
View 1 Replies
View Related
Oct 17, 2007
Apologies if this has been posted before and feel free to point me to an existing thread if it has.
I currently have a dev, stage and live environment for a package
i have created a load.dtsconfig file that contains various bits such as connection strings, email to, from, etc which i created via the package configurations in the dev package. I then made a few changes via XML Notepad
I went to use the same config file on stage and decided to add a further property. I selected package configurations on stage and selected edit it the package configurations box, added the property and clicked finish. However it reset all the existing properties to the values that exist in the actual package so all the changes i made via XML notepad were overwritten.
Is there anyway you can get the Package configurations editor to retain the values from the .dtsconfig file rather than reading in the values from the package???
cheers
Scott
View 4 Replies
View Related