Wednesday, March 21, 2012
I Want to Lock One Record
When a user opens a record for editing, it want to mark the record as locked so that if other users try to open this record, it will not be available.
Currently, I'm using a programmatic method that basically sets a field 'lock" to 1 if the record is in use and 0 if not in use. But this has the side affact of locking the record if the user reboots their workstation. In addition, I don't believe that this is the best method and approach to achieve my goal.
Thanks very much for your help in advance. All ideas are welcome.
crownlogI think u can make use of SQL Server's locking mechanism.
example:
U can put a special feild as a semphemore.
when a user opens a record,the program begin a transaction and update the field to 1 immdiately.When the user press save button in front-program,the transaction will commit.When the locker workstation reboots,the transaction will auto-released right now,and the other waiting program will get the control immdiately.|||enhydraboy,
Thanks very much. Might you have more details or an example in using MSSQL2K locking mech.
Regards
crownlog|||Nobody?
This is a bad design. It's the path that leads to...the dark side..
You should desgin the table so that it has an update datetime column.
Every time a row is modified, update that column.
If you need to know if the row was modified, check that column again and compare the datetimes...if they are the same, good to go...if they're different, show the user the changes...you could even build something to allow them to merge the 2...then apply the update...
The my own opinion (MOO)|||crownlog ... listen to Brett's advice. What if your user, after locking the row, goes to lunch or home for the weekend or Aruba for the week or Australia after embezzling $1M? best to not lock the row until ready to update!|||should read...
"best to let sql server manage ALL of your locking"|||Actually, the issue is that I need to open a record and keep it opened the entire time it is being edited by user1 - could be minutes. I need to keep all the other users from trying to open it while it is being edited by User1. I only need that record locked during the edit.
What's the best way to do it?|||Why is a bad design?
Is A timestamp field good?
What I can confirm is that is not what the crownlog requests.|||Actually, the issue is that I need to open a record and keep it opened the entire time it is being edited by user1 - could be minutes. I need to keep all the other users from trying to open it while it is being edited by User1. I only need that record locked during the edit.
What's the best way to do it?
Let me tell my solution in detail,but u must suffer my bad english first.
Everybody knows that RDBMS uses locking to keep consistency of updating and reading during cocurrent sessions.
So when we program in VB/VC/Delphi,we needn't care anything because sqlserver engine will do it better.
crownlog's case is that he want find a solution that will synchronize transaction between different clients(according to per application).
So we must establish a synchronization rules,we need a center-locking control.
There are many solution u can choose:
1 Unique Application server,u must program by yourself
2 Let SQL Server became a center-locking control server,because database locking control is very perfect.What u need do is understanding it and making use of it.
About "best to let sql server manage ALL of your locking",I haven't read the book.But I know if I unstand sql server well,I am not fraid to using it and I well let sql server serve for me saftly.|||crownlog ... listen to Brett's advice. What if your user, after locking the row, goes to lunch or home for the weekend or Aruba for the week or Australia after embezzling $1M? best to not lock the row until ready to update!
It's the problem crownlog must think it over.
How to realize his requests in UI function.
Using locking or using timestamp,U will not avoid the problem that when one body go home for sleeping without quit his appliction,the others must wait he come back to finish his work.
Maybe u must need administrator to force one to go out.So It's not the problem of techniques.|||Maybe a combination of the two. A binary field to determine whether the record is being currently used, and a time limit of say 10 minutes, so another field with a timestamp. Assuming all the systems are using a level 2 time clock server. You could have a script running in the background to clear out any locked fields and set it to 0 if the time has lapsed comparative to the timestamp. Also setting a timer on the page of your application, and maybe a timestamp refresh button. It would force the user to pay attention to what they are doing. If I'm not getting my idea across, just drop me an e-mail, and I'll try to get some sort of flowchart together to explain it better.
Monday, March 19, 2012
I want duplicates in my matrix!
spreadsheet and work with it. It consists of a single matrix with 3 row
groups, 1 column group and 1 "fact" cell. When it is run, either in preview
or deploy mode, the report is hiding duplicate values in the first column in
the row groups. (The left-most row group.) "Hide duplicates" is most
definitely *not* checked on the properties page.
I read somewhere of a developer experiencing this problem in Visual Studio
and having the problem disappear when the report is deployed. This is not
happening for me; the report hides duplicates all the time. Did I mention
that "Hide duplicates" is definitely *not* checked? [Tongue]
I've tried re-writing the report from scratch: no joy.
Any help appreciated, as the end-users don't like having to put the
duplicate values back in so that they can work with the data in Excel.
MikeWhen you say you want to show duplicates, what do you mean by a duplicate?
For the range you are interested in, are all rows (excluding fact cell) of
the same value?
"Mike Austin" wrote:
> I have a very simple report that allows users to extract data to an excel
> spreadsheet and work with it. It consists of a single matrix with 3 row
> groups, 1 column group and 1 "fact" cell. When it is run, either in preview
> or deploy mode, the report is hiding duplicate values in the first column in
> the row groups. (The left-most row group.) "Hide duplicates" is most
> definitely *not* checked on the properties page.
> I read somewhere of a developer experiencing this problem in Visual Studio
> and having the problem disappear when the report is deployed. This is not
> happening for me; the report hides duplicates all the time. Did I mention
> that "Hide duplicates" is definitely *not* checked? [Tongue]
> I've tried re-writing the report from scratch: no joy.
> Any help appreciated, as the end-users don't like having to put the
> duplicate values back in so that they can work with the data in Excel.
> Mike
Monday, March 12, 2012
I really need help here
My site is currently down. When users try to view a report they get
An internal error occurred on the report server. See the error log for more
details. (rsInternalError) Get Online Help
Could not allocate space for object 'ChunkData' in database
'ReportServerTempDB' because the 'PRIMARY' filegroup is full.
It was working fine until I loaded a new report a few days ago the
ReportServerTempDB when from a mere 400MB to 2.5GB. How can I fix this
please? I can't seem to find any info on this.
ThanksThis is a multi-part message in MIME format.
--=_NextPart_000_000B_01C71267.EA8848C0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
Seems like your temp db is full. Try doing a transaction log backup with =truncate to shrink it.
Not quite sure what would cause the temp db to fill up like that, =though. Shrink it first, then you could run SQL Profiler against that db =do see what sort of statements that increases it so much over time.
Some of these articles might be usefull to you:
How to stop the transaction log of a SQL Server database from growing =unexpectedly
http://support.microsoft.com/kb/873235
Planning for Scalability and Performance with Reporting Services
http://www.microsoft.com/technet/prodtechnol/sql/2005/pspsqlrs.mspx
How to Performance Tune the Microsoft SQL Server tempdb Database
http://www.sql-server-performance.com/tempdb.asp
Kaisa M. Lindahl Lervik
"Chris" <Chris@.discussions.microsoft.com> wrote in message =news:9A24D6A4-E0E3-4540-8906-94C26EB7E6A2@.microsoft.com...
> Hi,
> My site is currently down. When users try to view a report they get
> > An internal error occurred on the report server. See the error log for =more > details. (rsInternalError) Get Online Help
> Could not allocate space for object 'ChunkData' in database > 'ReportServerTempDB' because the 'PRIMARY' filegroup is full. > > It was working fine until I loaded a new report a few days ago the > ReportServerTempDB when from a mere 400MB to 2.5GB. How can I fix this =
> please? I can't seem to find any info on this.
> > Thanks
--=_NextPart_000_000B_01C71267.EA8848C0
Content-Type: text/html;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Seems like your temp db is full. Try =doing a transaction log backup with truncate to shrink it.
Not quite sure what would cause the =temp db to fill up like that, though. Shrink it first, then you could run SQL Profiler =against that db do see what sort of statements that increases it so much over time.
Some of these articles might be usefull =to you:
How to stop the =transaction log of a SQL Server database from growing unexpectedly
http://support.microsoft.com/kb/873235
Planning for Scalability and Performance =with Reporting Services
http://www.microsoft.com/technet/prodtechnol/sql/2005/pspsqlrs.m=spx
How to =Performance Tune the Microsoft SQL Server tempdb Database
Kaisa M. Lindahl Lervik
"Chris"
--=_NextPart_000_000B_01C71267.EA8848C0--
Friday, March 9, 2012
I need to restrict [database].MDF file's using on other MSSQL server. HELP!
I have a database named SUTDNet on a server on my computer. I created
a few users for this database and i restricted any one's interests for
this database. However, i can't hide my database's datas when anyone
copies SUTDNet.mdf database file from my computer and attaches this
file on other server on other computer. The thief of data file can
enter my computer. When it goes, all user rights for the database on
my server are ineffective on other server.
How do I keep my datas from a theft like copying my data files.
Really appreciate any help and advice offered. Thank you.
Regards
Orgil.Orgil
Please do not multipost.The question has already answered in .programming
group.
"Orgil" <orgilhp@.yahoo.com> wrote in message
news:1174539323.344840.89960@.d57g2000hsg.googlegroups.com...
> Hi.
> I have a database named SUTDNet on a server on my computer. I created
> a few users for this database and i restricted any one's interests for
> this database. However, i can't hide my database's datas when anyone
> copies SUTDNet.mdf database file from my computer and attaches this
> file on other server on other computer. The thief of data file can
> enter my computer. When it goes, all user rights for the database on
> my server are ineffective on other server.
> How do I keep my datas from a theft like copying my data files.
> Really appreciate any help and advice offered. Thank you.
> Regards
> Orgil.
>
Sunday, February 19, 2012
I need Help Urgent
Hi all!
I have an Application thats runs on my network Peoples have to Update their Client Apps to the newst version.
Most of Users are not well aware of computers.
I have a sinario to update the Client Application details bellow:
Provide a link e.g. Http://www.myserver.com/updates.aspx?action=getupdates
I want the client click the Link and my asp.net Page do the following
1- Compare the version of the Application on local machine With App.exe on server
2- Tell User if he / she needs Updates
3- Proceed according to the users Desion
Download without prompting the User
Install Update
Exit the web browser or redirct
Please Help me if any one have some directions or Working Examples.
Happy Coding
//////// Rashed
Look at the ClickOnce technology, it brings all the stuff out-of-the-box.
Jens K. Suessmeyer
http://www.sqlserver2005.de