Data Controls :: How To Log All Operations Performed In SQL Server Database
Oct 17, 2012
Today my client has asked me to do Data Base Log,that is if any change done like,Insert or Edit or delete that has to be viewable in Log Report,if somebody did even a Small change that also has to be keep track and has to display in Log Report,like the recent activity is so and so and so and so person has done this.
I only need one textbox inside gridview and other operational buttons like add , edit , delete in gridview. I just need that these buttons can save the data in datatable like we do :
DataTable dt = new Datatable();
I don't want to save it in database at this stage. CRUD Operations using datatable inside gridview is my aim.
in my case, It is the windows service which in running the long running insert/update on a table and I need to cancel the operation from my ASP.NET application. In the above link Burnsys suggests that one should kill the Sql server session. Is that really only way and a goood practice to do this? Also, in the same poset can use SqlCommand.Cancel to cancel. However, I am not sure how can I cancel the command from the windows service from ASP.NET application.
I want to ask that what happens when I make a database request (using Linq-To-Sql). Active thread is blocked and waits for response, or it is used to process other requests?
Do frameworks like Linq-To-Sql or Linq-To-Entities handle this?
If I use Sleep() method on thread, is that thread blocked or is it used to process other requests?
According to the msdn documentation, as you can see on the diagram, a server control's "Data binding events" occurs after all "control changed events". So in the case of a DetailsView control, the ItemInserted event would happen before the database operation?
i am displaying a gridview from db(SQL2005), which display leave table where employee apply leave and submit to admin. Viewing the leave table in gridview the admin sanction or rejected their leave request, by clicking the check box displays on each gridview rows and click on sanction or rejected button.
here i am sending SMS to the employee number displaying in the gridview (taking the employee phone number and send SMS).. this i have done using bulk SMS services, i have taken the number using the following if check conditions...
but now what the problem is i have to delete the gridview rows.. i am using the same employee phonenumber to delete the corresponding gridview, but if suppose the single employee applied for two or more leave, the gridview display all leave for the single employee, the admin have sanction only one leave for that employee.. so if he checks the check box and click on OK button.. it have to delete the corresponding row as well as send SMS to the phonenumber of the employee.. Other leaves of the same employee display in the gridview.. i used the following coding
Protected Sub bttnsanction_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles bttnsanction.Click Dim row As GridViewRow Dim selection As New ArrayList() For i As Integer = 0 To GridView1.Rows.Count - 1.........
I am using the Sno as primary key in leave table.. where i want to delete the corresponding row which sends SMS to employee number also the delete the row of corresponding Sno.. i have to get the corresponding gridview row sno in the delete store procedure..
I have seen a sample from the Author of this Blog URL....this works fine but how to apply CRUDE operations & Is it possible to set CommandName/ Command Argument using JQuery in asp.net using C#?
I have placed Chekc box in Gridview when i select the check box can perform 2 operations simultaniously one is entire recordset is populated into form fileds and second one is can delete the selected record permanently from database table.following code for this fuctionality.
I recently purchased a new domain for the sole purpose of hosting all the static content on a separate server and delegate CPU intensive operation like thumbnail creation on a different pool. Now I would like to do some operations on images uploaded to that remote server : creating thumbnails or updating the image if we need to. Should I download the images to my server, modify them there and then upload them back to the remote server or should I try to create web-services to manipulate the images?One of my solution was to provide an interface to upload and manipulate the images in the new domain, by leaving the old domain when it comes time to work on images, but I find it kind of awkward.I would like to keep the new domain cookie free. How would that affect my ability to restrict any random user to use the web-services if I decide to go that way?
How do I ensure and enforce that all write operations to my MS SQL Server DB are transactions-based?
The reason I want to do this is that the DB contains financial account data and operations that fail halfway through some set of changes should not be able to mess up the database by mistake or by crashing.
The application is written in ASP.NET C#.
Edit:
There is a DAL but it does not (yet) require transactions for changes.We wrote the DAL ourselves. We did not use ORM.
I know how to perform one transaction from ASP.NET.
I want to ensure that all changes are made in transaction form so that if the application throws some exception in the middle, there will be no change to the database.
I just having some query regarding Garbage collection. when this would be performed. It sense that whether it would be called while executing the each page or some other time.?
I'm am experiencing some strange behavior with a website. I have a page that performs a simple AJAX request to fill a div. The data is fetched from a page in the same domain. When I perform the request using [URL]. The requests work perfectly, but when using [URL] or [URL]. My requests are simply ignored. I've used Firebug to track requests, and not even a single ajax request is performed. Normal requests (such as fetching the main page that invokes the ajax code) works fine on both scenarios.
when i want insert a record i see an error like this
Can't perform Create, Update, or Delete operations on 'Table(MainMenuLink)' because it has no primary key.
with this codes:
MyLinqDataClassesDataContext db = new MyLinqDataClassesDataContext(); MainMenuLink li = new MainMenuLink { Link ="../error/error.aspx", LinkSubject = "subject" }; db.MainMenuLinks.InsertOnSubmit(li); db.SubmitChanges(); ShowLinks();
what is the problem?
my table have a primary key but i dont know why give an error!!!
I have a from in which upon pressing submit button all the data were appear on the grid.But i want to do one thing over here which is that at the end of the gridview there was a button upon clicking on that button all of the data were go directly to the database...
I am trying to set up a server on my own pc to test programs i am making, however i keep running into an issue with Access databases saying that it's not registered on my local machine or something like that. So i was thinking of trying MySql instead, but i cant figure out how to set up a database to run on my pc. I have done it using MySql Workbench before to connect to a database set up on my schools server, but that was an already set up database that they created for each student. I want to know how to set one up on my own pc. how to set this up? I tried the server administration section of MySql Workbench but it seems to ask for an existing database already.
when i want insert a record i see an error like this Can't perform Create, Update, or Delete operations on 'Table(MainMenuLink)' because it has no primary key. with this codes:
MyLinqDataClassesDataContext db = new MyLinqDataClassesDataContext(); MainMenuLink li = new MainMenuLink { Link = "www.tprogrammer.com", LinkSubject = "subject" }; db.MainMenuLinks.InsertOnSubmit(li); [code]....
I have been debating back and forth between using a database or the file server to store images for users. Finally when I decided to use the file server I found it difficult. What I am trying to do is give a user the option to save multiple profile pictures. I have looked all over for tutorials on how to save to the file server but could find nothing related. Essentially what I would like to do is create folders for each user and their images. I am having no luck. Does anyone have example code or links to what I am looking for?
I want to take first Full backup of my database then Differential backup of database automatically on a fixed interval of time and save it into my files of system. After that i want to upload these files on server. when uploading is successful then i want to delete these files from the system. If backup of database is failed then a mail should go to the related person. How i will do it.