Search Results

Search found 7391 results on 296 pages for 'record locking'.

Page 101/296 | < Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >

  • How to deal with large result sets with Linq to Entities?

    - by user169867
    I have a fairly complex linq to entities query that I display on a website. It uses paging so I never pull down more than 50 records at a time for display. But I also want to give the user the option to export the full results to Excel or some other file format. My concern is that there could potentially be a large # of records all being loaded into memory at one time to do this. Is there a way to process a linq result set 1 record at a time like you could w/ a datareader so only 1 record is really being kept in memory at a time? I'd appreciate any help. Thanks

    Read the article

  • Java - JPA - @Version annotation

    - by Yatendra Goel
    I am new to JPA. I am cofused about the @Version annotation. How it works? I have googled it and found various answers whose extract is as follows: JPA uses a version field in your entities to detect concurrent modifications to the same datastore record. When the JPA runtime detects an attempt to concurrently modify the same record, it throws an exception to the transaction attempting to commit last. But still I am not sure how it works? ================================================================================== Also as from the following lines: You should consider version fields immutable. Changing the field value has undefined results. Does it mean that we should declare our version field as final

    Read the article

  • How to speed up saving data to database over the internet?

    - by robert_d
    I am using C#, Entity Framework and SQL Server 2008 Express. I am connected to the database over the internet. What is the best method to speed up saving/updating data to database? It takes 87 seconds to save 180 records to the database. It takes only 3.5 seconds to save the same number of records to local (on the same machine) SQL Server. For every record that I save/update I check if record with this primary key exists in the database, if it doesn't exists I simply save it, if it exists I update it using ObjectContext.ApplyCurrentValues(entitySetName, currentEntity) method.

    Read the article

  • [JS] How to manipulate a PHP Array in javascript?

    - by rasouza
    I have an Array in PHP which contains data from database. And it prints out also as a table in the same page which has an AJAX delete function. Trying to explain better The array contains debt sums related to many people, it is the application's main function. In the same page, there is a table containing every debt record related to the array, which can be deleted or edited using AJAX. I have coded the part of deleting the record and removing the TR entry, but it's not enough: I'd like to change also the debt sum using AJAX which is an PHP Array. What I have I have the JS function which removes the TR when the delete button is clicked // TR Fading when deleted $('.delete') .click(function() { $.ajax({ type: 'GET', url: 'history/delete/id/'+$(this).attr('id') }); $(this).parent().parent().fadeOut(); return false; }); and I have the PHP array (image)

    Read the article

  • Why do values in the row I insert not match the values in the insert query?

    - by user202411
    I just can't understand why is my database (mysql) behaving like this! My console shows that the record is created properly (please, notice the "remote_id" value): Tweet Create (0.3ms) INSERT INTO `tweets` (`remote_id`, `text`, `user_id`, `twitter_account_id`) VALUES (12325438258, 'jamaica', 1, 1) But when I check the record, it shows that the remote_id is 2147483647 intead of the provided value (12325438258 in the example above)... This table has many entries, but this field is always written with 2147483647... It was supposed to fill this space with an unique id (which I guarantee you is being generated properly).

    Read the article

  • Classic asp paging and session state

    - by flavour404
    Hi, Working on a classic asp page that uses paging. The error I am having a problem with is this: Lets say that you have 5 pages returned in your record set and you are on page 2. You leave and come back, you then press the link for page 3, the trouble is your session has timed out. I don't know why this happens but the page is reloaded, but the session check is bypassed and of course when the page attempts to retrieve the record set the session variables are now empty so I am getting a message stating: error near ',' line 1, because now the query is defunct. How do I get around this? Thanks, Ron.

    Read the article

  • Basic SQL query question

    - by user318573
    Hello, I have the following query: SELECT Base.ReportDate, Base.PropertyCode, Base.FirstName, Base.MiddleName, Base.LastName, Person.FirstName, Person.MiddleName, Person.LastName FROM LeaseT INNER JOIN Base ON LeaseT.LeaseID = Base.LeaseID INNER JOIN Person ON LeaseT.TenantID = Person.ID works fine, except there could be 0 to 'N' people in the 'Person' table for each record in the Base table, but I only want to return exactly 1 for each 'Base' record (doesn't matter which, but the one with the lowest Person.ID) would be a reasonable choice. If there is 0 rows in the person table, I still need to return the row, but with null values for the 'person' fields. How would I structure the SQL to do that? Thanks. Edit: Yes, the tables are probably not structured properly, but restructuring at this time is not possible - got to work with what is there.

    Read the article

  • SQL Server 2008 EF 4 - limiting database records returned using permissions?

    - by Chuck
    In our database all tables are linked back to a single table. This table has a bit column to limit whether the record is displayed. Currently the records are filtered on the code side of the website. Is there any way to set up permission so that userA would never see any record in the database where that common bit column was set to true? We are using SQL Server 2008. Alternatively we are also using entity framework 4.0 in .net 4 (in c#) if you have any ideas how it might be accomplished there? Thanks for your feedback.

    Read the article

  • Implementing a 'many-to-many' database

    - by Raven Dreamer
    Greetings, stack*overflow* In my database, I already have one table, 'contacts' that contains records of individual people. I also have several other tables in my database which represent "skill sets" that contain records denoting a particular skill. 1) Am I correct in plotting this as a "many-to-many" relationship? (each contact can have multiple skill sets, and each skill set can belong to multiple contacts) 2) I'm new to databases -- do I want to link the tables? 3) Is there a way to implement this in my program (C# + windows forms) such that for any given record in the 'contacts' table, either the names of all associated 'skill set' tables or all the 'skill' records associated with the 'contact' record could be retrieved? (Database is located on SQL Server Express 2008)

    Read the article

  • Concatenating a Text in front of Individual Database Records with Tcl

    - by DFM
    Hello: In short, currently I am using the following code to pull records from multiple tables in a Sqlite Db and insert them in a single combobox ($SearchBar): set SrchVals1 [db eval {SELECT DISTINCT Stitle From Subcontract Order By Stitle ASC}] set SrchVals2 [db eval {... set SrchVals3 ... set SrchValsALL [concat $SrchVals1 $SrchVals2 $SrchVals3] $SearchBar configure -value $SrchValsAll For the variable "SrchVals1", I am trying to figure out a way to concatenate the text "Sub: " to each individual record in SrchVals1. For example, if SrchVals1 shows the following records in the combobox: First Title Second Title Third Title I would like to concatenate so that the records in the combobox look like this: Sub: First Title Sub: Second Title Sub: Third Title I understand that I might have to use a foreach statement; however, I am having no luck writing one that adds "Sub: " in front of each record, as opposed to one. This seems like something that should be pretty easy, but I cannot seem to figure it out. Does anyone know how I can achieve these results? Thank you, DFM

    Read the article

  • ORACLE -1401 error

    - by Sachin Chourasiya
    I have a stored procedure in Oracle 9i which inserts records in a table. The table has a primary key built to ensure duplicte rows doesnot exists. I am trying to insert a record by calling this stored procedure and it works first time properly. I am again trying to insert a duplicate record and expecting unique constraint violation error. But I am getting ORA-01401 inserted value too large for column I knew its meaning but my query is , if the value inserted is really large then how it got successful in the first attempt.

    Read the article

  • SQL Selecting from one table OR another then joining the two

    - by Cyprus106
    So this is interesting, and apparently beyond my SQL skillset. I need to select a particular record where an ID="0003" (or whatever) from either table1 or table2 if table1 doesn't have that record. Then I need to join table1 and table2 on a mutual field they both have (field name is Product_ID) I was playing with all sorts of variations of the following, (no, it doesn't work) but after 2 days of groping through the internet and a big SQL book I still can't figure anything out. SELECT ProductStock.Product_ID AS PSID, Products.ID AS PID, ProductStock.*, Products.* FROM ProductStock, Products LEFT JOIN (Products AS Pr) ON Pr.ID=ProductStock.Product_ID WHERE (ProductStock.ID="6003" OR Products.ID="6003")

    Read the article

  • Representing parent-child relationships in SharePoint lists

    - by Chris Farmer
    I need to create some functionality in our SharePoint app that populates a list or lists with some simple hierarchical data. Each parent record will represent a "submission" and each child record will be a "submission item." There's a 1-to-n relationship between submissions and submission items. Is this practical to do in SharePoint? The only types of list relationships I've done so far are lookup columns, but this seems a bit different. Also, once such a list relationship is established, then what's the best way to create views on this kind of data. I'm almost convinced that it'd be easier just to write this stuff to an external database, but I'd like to give SharePoint a shot in order to take advantage of the automated search capabilities.

    Read the article

  • effective counter for unique number of visits in PHP & MySQL

    - by Adnan
    Hello, I am creating a counter for unique number of visits on a post, so what I have until now is a table for storing data like this; cvp_post_id | cvp_ip | cvp_user_id In cases a registered user visits a post, for the first time a record is inserted with cpv_post_id and cvp_user_id, so for his next visit I query the table and if the record is available I do not count him as a new visitor. In cases of an anonymous user the same happens but now the cvp_ip and cpv_post_id are used. My concerns is that I do a query every time anyone visits a post for checking if there has been a visit, what would be a more effective way for doing this?

    Read the article

  • SQL Server Stored Procedure that return processed records number

    - by Ras
    I have a winform application that fires a Stored Procedure which elaborates several records (around 500k). In order to inform the user about how many record have been processed, I would need a SP which returns a value every n records. For example, every 1000 row processed (most are INSERT). Otherwise I would be able only to inform when ALL record are processed. Any hints how to solve this? I thought it could be useful to use a trigger or some scheduled task, but I cannot figure out how to implement it.

    Read the article

  • how to send database data to a MySQL server to update the server database.

    - by haisergeant
    Hi everyone, I am developing Smoking counter and I need to send all the smoking record (about the time user smoking) to database on the server. The server database is MySQL database. I knew that I must have send data to PHP page/script, and this page/script will run on the data to insert record to database. I would like to know: is there another way to update database, because I don't have knowledge about PHP. I used to work on java and c/c++/objective-c. If you know another way to do this task, please let me know. Any help would be appreciated.

    Read the article

  • Using an observer within an Engine

    - by Tim
    I've created an Engine which is basically used for all of our projects. Now what I want to do is add a before_create callback to all of the models in this Engine. After some searching I found out that an observer is the way to go. So, I've created this observer: class AuthObserver < ActiveRecord::Observer def before_create( record ) p record end end And now I need to add it to the application, but of course in my Engine there is no such file as application.rb. What I tried is adding it to an initializer located in /config/initializers/observers.rb Like so: Rails.application.config.active_record.observers = :auth_observer But this doesn't work, and it throws no errors. Anybody out here has experience using an observer inside an engine? Thanks a lot!

    Read the article

  • Why in the hell is this happening?

    - by user202411
    I just can't understand why is my database (mysql) behaving like this! My console shows that the record is created properly (please, notice the "remote_id" value): Tweet Create (0.3ms) INSERT INTO `tweets` (`remote_id`, `text`, `user_id`, `twitter_account_id`) VALUES (12325438258, 'jamaica', 1, 1) But when I check the record, it shows that the remote_id is 2147483647 intead of the provided value (12325438258 in the example above)... This table has many entries, but this field is always written with 2147483647... It was supposed to fill this space with an unique id (which I guarantee you is being generated properly).

    Read the article

  • Separate web and email host

    - by user871993
    My client has their domain name (lorem.com) registered with company X which also host their email. I'd like to host their new website with separate hosting company (company Y). I know I need to update the DNS nameservers for their domain name to point to company Y's nameservers. I'm not sure how to handle the email host though. Doing an MX lookup on their domain, currently shows: Pref Hostname 10 lorem.com 20 mx2.companyX.com Do I need to do any updates to the MX record? Also, do I need to add/edit the A record to point to company Y's IP address? Thanks!

    Read the article

  • Deploy tracking with Ruby on Rails and Capistrano

    - by TK
    Like every commit has a reason and purpose, I think each deploy has a purpose and reason. Source code commits have a comment. But deploying doesn't have any. How do I record a reason and purpose for each deploy automatically? I need to keep a record of: Who deployed to where and what time. Why deployed? Bug fixes? Feature update? Emergency fix not on iteration plan? Which git or svn ref was used? Have anybody felt the need for this kind of system? How do you feel about my approach? How can I achieve my goal? I'm currently using Capistrano for deployment.

    Read the article

  • How to Delete Duplicate Rows in SQL 2000?

    - by Mikecancook
    I thought I had this figured out but it turns out I'm just deleting the first record. The following returns the duplicate rows. All have a count of 2. I just want to delete the first one for each duplicate record. select scorestudentid, scoreadvisor, scorecorrect, count(*) from scores where scoretestid = 3284 group by scorestudentid, scoreadvisor, scorecorrect having count(scorestudentid) > 1 Which returns: scorestudentid scoreadvisor scorecorrect no column name 13033719 28059 3.0 2 13033777 28086 3.0 2 13033826 28147 3.0 2 13033960 28023 3.0 2 So I put this together thinking it would work: set rowcount 1 delete from scores where scoretestid = 3284 and scorestudentid in ( select scorestudentid from scores where scoretestid = 3284 group by scorestudentid having count(scorestudentid) > 1) It really seems like it should be a simple concept but I'm not getting it.

    Read the article

  • Update int array based on parent

    - by Pickels
    I have the following int[] in my database: '{0}' '{0,0}' '{0,0,0}' '{0,0,0,0}' This column is used to sort my tree data. Now when a parent updates it's order the children should also update. For example if the second record updates it's order to 1 it should result in the following. '{0}' '{0,1}' '{0,1,0}' '{0,1,0,0}' So I was wondering what the query would be to update record 3 and 4. In case it's not clear what I am asking leave a comment I can add additional information. Screenshot of my actual data:

    Read the article

  • Simple performance testing tool in C#?

    - by Tomas
    Hi, At first -I need to do it as my university project so I am not interested in using existing tools. I would like to know whether it is even possible to write a very simple tool that I could use for performance testing of web applications. It would only record actions (I do not know, maybe just packet sniffering?) and then replay. However I have basic idea (record packets on port 80 and sending them again), I do not know how to measure time for each transaction as they are not differentiated. Any help is greatly appreciated, thank you!

    Read the article

  • Why Does TFS Allow Orphaned Content and How Do I Get Rid of It?

    - by Chad
    My TfsVersionControl database has grown to 40+ GB in size. We recently did a TFS Destroy on a folder tree that should have cleared up at least 10 GB but instead it seemed to have no effect. When I look at the tables in TfsVersionControl, I am first shocked to see that there are no foreign keys at all in the database. Running a few queries, I see that there is some orphaning going on: tbl_Content has 13.9 GB of records that don't have a related tbl_File record tbl_File and tbl_Content have 2.4 GB that don't have a related tbl_Namespace record The cleanup job seems to be running nightly (prc_DeleteUnusedContent) and running it against the database manually doesn't remove any orphans. I see in the log for the cleanup job that it failed on 3/16, which is the morning after I destroyed the large amount of data. The error was due to a full transaction log. Could that error be the reason I'm left with all this orphaned data that can't be deleted? How can I permanently destroy this unneeded content?

    Read the article

< Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >