Lock A Record When Two Members Are Trying To Access It?
Jul 5, 2010
I have the scenario like this,
My environment is .Net2.0, VS 2008, Web Application
I need to lock a record when two members are trying to access at the same time.
We can do it in two ways,
By Front end (putting the sessionID and record unique number in the dictionary and keeping it as a static or application variable), we will release when the response is go out of that page, client is not connected, after the post button is clicked and session is out. By backend (record locking in the DB itself - need to study - my team member is looking ).
Is there any others to ways to do and do I need to look at other ways in each and every steps?
View 3 Replies
Similar Messages:
Jan 17, 2011
Can I lock a record that is being edited, and restrict more than one user from editing the same record at the same time? using VB.NET or SQL Stored Procedure.
View 3 Replies
Jun 27, 2010
I have written a script to write several values to an Access Database Table, but I need to ammend i so it checks for two values (Asset and LName) to see if they match if they do it updates the record if not it writes a new record, my script so far is as follows :
[Code]....
I'm just stuck as I can't work out the best way to do it,
View 17 Replies
Apr 28, 2010
Our site has a page for maintenance of existing members (e.g. adding / changing roles, etc.)This page currently uses a gridview to show a complete list of all members, based on GetMembers() method to populate it.However, as the number of users has grown to several hundred, it has become difficult to locate a particular user by paging through several pages.Is there a way to narrow down this list, maybe with a filtering textbox, so that as you start typing into that textbox, only members whose name contains the typed characters will show up in the gridview?
View 8 Replies
Dec 17, 2010
The website will have public and private (members) access.I'm using VB and MS access database. Registering, login, MasterPage (Master1), default.aspx and users (members.aspx) pages are already set up. What I wanted or what I'm thinking to do is to also base the members.aspx on the MasterPage.
When a user logged in, I wanted to add additional menu (reserved only to members) to the MasterPage and
remove/hide unnecessary menu. Here is a scheme of what I want:
MasterPage + default.aspx: (visible to the public)
Menu1
Menu11, Menu12, Menu13
Menu2
Menu21, Menu22, Menu23
MasterPage + members.aspx: (When user login)
Menu1
Menu11, Menu12, Menu13
Menu3
Menu31, Menu32, Menu33
If the user logout, it will return to MasterPage + default.aspx. Nowing that if the user authentication successful, he will redirected to members.aspx,
1. how can I, when loading members.aspx, manage the MasterPage so that I can show and hide some of its menu? how to use members controls on the MasterPage?
2. in case I'm wrong with what I'm trying to to do, what is your advice?
3. FYI, I'm using VB. Any code in C# will also be OK. I will just have to convert it.
4. I might probably use placeHolder to show and hide these menu in the Page_load event of members.aspx (refer to what I don't want in 3).
View 6 Replies
Dec 30, 2010
If we declare a static variable in Global.asax then how to access it inside an ASP.NET page ?
<script runat=server">
public static object myObject = new MyClass();
// Application_Start() and other stuff goes here.
</script>
And, is this a good idea for storing a global object (same instance for all requests) ?
View 3 Replies
Apr 27, 2010
I have a single project. and I have two folder in it. In the 1st folder I have a class named Class1 and in the 2nd folder I have a class named Class2. Can anyone tell me how I can access members of Class1 in Class2. I have tried by adding namespace in Class1 and Using that namespace in Class2. But it is giving error. It is easy to access classes or their members from App_Code folder. I don't want to put my classes in app_code folder.
View 5 Replies
Aug 8, 2010
I am working on an application that resides on a development server on our internal network. The application was originally written to use Membership and Roles. We got busy almost a year ago before the app was finished, and now we are trying to get it ready to use internally.
The login page works just fine, but I have lost the ability to controls users and roles. I am running Visual Studio 2010 Professional now on a Windows 7 VM. I can open the application fine but there is no Web Administration Tool available for me to manage users or roles. If I go to Website -> in Visual Studio, there is no option for ASP.NET Configuration in the drop down menu. It simply isn't there.
How can I regain access to manage users and roles for this application? We are using Forms authentication and the database resides on a SQL Server 2005 instance on a separate box from the web server and my local VM.
View 6 Replies
Sep 17, 2010
I have my code output a gridview with all the data with an option to select records. I'm trying to make a code which would allow me to select a record, and then print this record using a specific Report stored in MS Access.
I've located the code to print the Report it self, but it prints ether all the records or a range.
View 3 Replies
Feb 10, 2011
I can access a module from code behind but not from the aspx page in inline VB code <% ... %>.
I know its got to be something simple but I can't seem to find the answer anywhere.
View 1 Replies
Aug 20, 2010
Since we can access the private data member of base class in the derived class with the help of friend function. How can we do the same in C# asp.net? I mean whats the alternative of friend function in C# asp.net
View 2 Replies
Oct 7, 2010
I'm having a problem trying to get the last record from my database.. I'm doing this: myCommand.Connection.Open()
View 2 Replies
Jan 22, 2010
I am using an access database to store my data. I have Add page which inserts data in the database. Also i have created an Edit page to read and then edit the data. In both these pages I am using FCKEditor. So I can take HTML values and insert in the database for a field called Desciption. Now when I am inserting a data having a long value for theDescription field and then editing that data using the Edit page the Description field get locked and the update command doesn't work. This happens for a data having a longDescription value. I have used the datatype Memo for Description field
View 3 Replies
Nov 9, 2010
Suppose I have an asp:Repeater that I am using to display a list of names and phone numbers.
<asp:Repeater runat="server">
<ItemTemplate>
<p><%# Eval("name") %></p>
<p><%# Eval("phoneNumber") %></p>
</ItemTemplate>
</asp:Repeater>
Now, let's make it more fun. Let's suppose that there is one or more phone number per name. I feel like I could use a repeater within a repeater to repeat the phone numbers. I could also use a for loop in my asp code. However, the Eval function is the only way I know of to access the current record at runtime and Eval only returns a string and only runs in <%# Eval("X") %>. How can I get the list of phone numbers that is a member of the current record?
View 1 Replies
May 14, 2010
I web application is in asp.net with Access databasesome times my application giving this error message "Could not read the record; currently locked by another user." or "Could not update; currently locked."I am using IDbConnection and IDbTransaction object.
View 2 Replies
Sep 7, 2010
Over the last couple of weeks, i've been playing around with expression web to try and update our current company website: [URL]
Basically, our site is quite simple. We have individual product categories that are displayed and then the user can click through to view the individual product specification and pictures of said product.
I've created the category pages and inserted hyperlink fields to link to the individual product pages which works fine.
The problem i'm having is getting the specification and pictures to display on the product pages.
I'm literally tearing my hair out as i'm quite new to this.
The access database i'm using has the following fields, ProductID, CategoryID, Description, Comments (This is the Specification field) and then Image1, Image2, Image3 etc all the way up to image 10.
What i've been trying to do is to use an imagefield within a gridview to pull the Image name from the image fields and then display said images from the images folder. I have got this to work of a fashion, yet all the images are displaying instead of the particular product images only. I believe i need to add a query string to do this yet i'm totally at a loss as to how to set this up...
I'm also having the same problem with the specification (comments field) as i can't figure out how to only display the individual product spec..
View 4 Replies
Aug 14, 2010
i m using asp.net 2005 with access 2003. i need a code using vb.
how can i sort the record in descending order?
View 3 Replies
Aug 26, 2010
I'm trying to put a registration page together in Visual Web Designer.
I would like to send a confirmation Email after someone is leaving his registration data and pressing the INSERT button.
The key fields in my database are: Email, Name, Surname, Address
Before I send the confirmation Email I would like to check if the email value entered in the form is realy added to the database.
I was copy past already some C code in my page, therefore it will be fine if the code can be in C.
- checking if record is realy added to database after pressing INSERT button
- setup the confirmation Email
View 13 Replies
Aug 18, 2010
I thought this would be easy before I started, but I should've known better.
I just need to get the value of primarykey from the newly inserted record so I can pass it in the query string to the next page the user will be directed to.
Here's my code:
Markup:
[Code]....
VB Code-Behind:
[Code]....
I had found what looked like a good soultion yesterday by the moderator "ecbruck" at this post:
[URL], but after spending many hours trying to figure out why I couldn't get it translated and working in my own project, I found that MS Access does not allow use of an Output Paramter. And unfortunately I don't have time to teach myself a new database platfrom and am stuck with MS Access for the moment...teaching myself asp.net has my head spining enough as it is.
View 1 Replies
Mar 17, 2010
I'm using an access database that has an AutoNumber field as the primary key. After adding a record I'd like to retrieve the ID for the record that was just entered, however, I'm not able to figure out how to do this in ASP.NET using standard AccesDataSource and FormView functionality. My goal is to retrieve the ID so that I can then use it to add an additional record in a child / sub table.
I could do it strictly using vb.net and forget about using the InsertCommand for the AccessDataSource and it's built in functionality. However, that would require a complete rewrite of some other items, accomplish this using the standard AccesDataSource functionality.
Below is a sample of something I've tried to do using "Direction='Output'" on one of the ID field for one of Insert paramaters (source: http://www.4guysfromrolla.com/articles/050207-1.aspx). The plan was to then caputre that "output" using the my "_OnInserted" sub procedue. However, apparantly I'm not able to use this with AccessDataSource. Did some research and saw that I'd have to switch to SqlDataSource which I'd rather not do cause all other pages use AccessDataSource and I'm having problems defining my connection string with it.
Html:
<html>
<body>
<form runat="server" id="Form1" method="post" encType="multipart/form-data">
<asp:FormView runat="server"
id="FormView1"
DataSourceID="DataSourceFormView1"
[Code]....
View 4 Replies
May 26, 2010
I have a webpage that you pass in an id parameter (via a querystring), which it then uses to fetch data from a database. Typically, a user would navigate to this page from another page that lists only those records that the user has access to. However, if they go directly to the page by typing in the URL in the Address Bar, they can effectively view any record they like. to type something like http://localhost/TestSite/ClientAdmin/ManageLocation.aspx?LocationID=5 into their Address Bar, they can access the database record with the LocationID equal to five - even though they shouldn't have access to it
View 2 Replies
Mar 1, 2010
i need to start reading a recordset starting from a specific record using SQL. For example: i've 10 records in my msaccess table and i'd like starting read it from record number 6 till the EOF.
View 4 Replies
Mar 6, 2011
i created register page with unique primry username field , when customer enter exsiting username the register process will not complete and this error msg will appear Server Error in '/WebSite1' Application. The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again. Source Error: Stack Trace:
[Code]....
Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955 how can i write it when customer press register button with duplicate username?
View 8 Replies
Mar 23, 2010
This is the first time i am using ms access database for the c# asp.net .
I am getting the following error when i try to insert the record.
Operation must use an updateable query.
[code]....
View 2 Replies
Sep 21, 2010
I ve an issue of uploading an .xls file to the server and picking it from server and loading the record to a table in the datatbase from the server. The code works on the application system but after publishing it i ve an error that read Could not find a part of the path 'C:inetpubwwwrootEngineDbUploads634207083546865207.xls'. please can any one put me through on how to sort this out. below is the code
protected void btnUpload_Click(object sender, EventArgs e) { string FileName = FileUpload1.PostedFile.FileName;
string saveDir = @""; string appPath = Request.ApplicationPath; string savePath = appPath + saveDir + Server.HtmlEncode(FileUpload1.FileName); String fileExtension = string.Empty; String path = Server.MapPath("~/Uploads/"); //try //{ //
The Files is not supported.You can only upload .xls Files format."; //} } //check if Files to be uploaded is with the extenstion name
xls. bool CheckFilesType(string FileName) { return Path.GetExtension(FileName).ToLower() == ".xls"; }
View 1 Replies