Search Results

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

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

  • JsonStore.insert() causes exception in extjs

    - by kalan
    I have an EditorGridPanel with toolbar button to add new records. Everything works fine except one scenario. When I try to insert a record which already exists in database, server sends back: {"success":false,"message":"already exists","data":{}} but grid creates a new row marked with red triangle. If after that I try to insert a new record (even if it doesn't exist in database), everything works fine on the server side, but i get an 'uncaught exception' in firebug. It says: 'uncaught exception: Ext.data.DataReader: #realize was called with invalid remote-data. Please see the docs for DataReader#realize and review your DataReader configuration.' why is that?

    Read the article

  • How to retrieve indentity column vaule after insert using LINQ

    - by Hobey
    Could any of you please show me how to complete the following tasks? // Prepare object to be saved // Note that MasterTable has MasterTableId as a Primary Key and it is an indentity column MasterTable masterTable = new MasterTable(); masterTable.Column1 = "Column 1 Value"; masterTable.Column2 = 111; // Instantiate DataContext DataContext myDataContext = new DataContext("<<ConnectionStrin>>"); // Save the record myDataContext.MasterTables.InsertOnSubmit(masterTable); myDataContext.SubmitChanges(); // ?QUESTION? // Now I need to retrieve the value of MasterTableId for the record just inserted above. Kind Regards

    Read the article

  • A null value should be considered as 0 when addition of it is done with decimal value.

    - by Harikrishna
    There are three column in the datatable A,B and C. Now each column is type of decimal. Now I am doing like dt.Columns["A"].Expression="B+C"; to make addition of Column B's record and column C's record. Now if there is any value of B or C is null then addition of B and C will be null like B's value is 3 and C's value is null for first row then B+C(3+null) will be null which is not appropriate, the result of addition should be 3.If I replace 0 instead of null then it will be ok.But whereever there is null value in the records it should be remain it is and it should not be replaced by 0.That is null value should not be replaced by 0 and when addition of null value is done with any decimal value null value should be considered as 0. Is it possible,how can we do this ?

    Read the article

  • How and when to log account access login with PHP?

    - by Nazgulled
    I want to implement a basic login system in some PHP app where no cookies will be involved. I mean, the user closes the browser and the login expires, it will remain active during the browser session (or if the user explicitly logs out) otherwise. I want to log all this activity and I'm thinking that every time the user refreshes the page, opens a different link or logs out, I record that time as the last access made by that user, overwriting the previous access log. But my problem is when and how should I insert another record into the database instead of overwriting the last one? Should I just define a timeout and if the last access was made above that timeout, another log should be inserted into the database? Should the session expire too after that timeout? Or is there a better way? Ideally, I would like to log the "log out action" when the browser was closed, but I don't think there's a way to detect that is there? Suggestions?

    Read the article

  • SQL Server uncorrelated subquery very slow

    - by brianberns
    I have a simple, uncorrelated subquery that performs very poorly on SQL Server. I'm not very experienced at reading execution plans, but it looks like the inner query is being executed once for every row in the outer query, even though the results are the same each time. What can I do to tell SQL Server to execute the inner query only once? The query looks like this: select * from Record record0_ where record0_.RecordTypeFK='c2a0ffa5-d23b-11db-9ea3-000e7f30d6a2' and ( record0_.EntityFK in ( select record1_.EntityFK from Record record1_ join RecordTextValue textvalues2_ on record1_.PK=textvalues2_.RecordFK and textvalues2_.FieldFK = '0d323c22-0ec2-11e0-a148-0018f3dde540' and (textvalues2_.Value like 'O%' escape '~') ) )

    Read the article

  • How to access data using VBSCRIPT from a stored procedure which contains values in Temp table ?

    - by Srivigneshwar
    Hi , for testing purpose I wrote a VBscript which will fetch values from Sybase by executing a stored procedure which contains values in temp table. When I run the script I get the following errors , "Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record." or "Item cannot be found in the collection corresponding to the requested name or ordinal." Somewhere when I was googling I found that , the above error message will be shown when we use temp table in stored procedure, if that is the reason , then how can I access data via VBscript by executing the stored procedure ??

    Read the article

  • Side effects of reordering columns in PostgreSQL

    - by Summer
    I sometimes re-order the columns in my Postgres DB. Since Postgres can only add columns at the end of tables, I end up re-ordering by adding new columns at the end of the table, setting them equal to existing columns, and then dropping the original columns. My question is: what does PostgreSQL do with the memory that's freed by dropped columns? Does it automatically re-use the memory, so a single record consumes the same amount of space as it did beforehand? But that would require a re-write of the whole table, so to avoid that, does it just keep a bunch of blank space around in each record? Thanks! ~S

    Read the article

  • How to name uploaded files in php to prevent them from being overwritten?

    - by user156814
    I'm trying to add user submitted articles to my website, (only for admins). With each article comes an option to upload up to 3 images. My database is set up like this Articles id user_id title body date_added last_edited Photos id (auto_increment) article_id First I save the article in the database, then I upload the photo (temporarily) then I create a new photo record in the database saving the article_id. Then I rename the uploaded photo to be the same as the primary key of the photo record, and to be a png. $filename = $photo->id . '.png'; I figured this would be a good way to prevent files form being overwritten. This seems flawed to me. Any suggestions on how I should save my records and photos? Thanks

    Read the article

  • Linq query: append column to query results

    - by jrubengb
    I am trying to figure out how to append a column to Linq query results based on the max value of the query. Essentially, I want to create an EnumerableRowCollection of DataRows that would include a max value record with the same value for each record. So if i have a hundred records returned through the query, I want to next calculate the max value of one of the fields, then append that max value to the original query table: DataTable dt = new DataTable(); dt = myDataSet.myDataTable; EnumerableRowCollection<DataRow> qrySelectRecords = (from d in dt.AsEnumerable() where d.Field<DateTime>("readingDate") >= startDate && g.Field<DateTime>("readingDate") <= endDate select d); Here's where I need help: double maxValue = qrySelectRecords.Field<double>("field1").Max(); foreach (DataRow dr in qrySelectRecords) { qrySelectRecords.Column.Append(maxValue) }

    Read the article

  • Php plugin to replace '->' with '.' as the member access operator ? Or even better: alternative synt

    - by Gigi
    Present day usable solution: Note that if you use an ide or an advanced editor, you could make a code template, or record a macro that inserts '->' when you press Ctrl and '.' or something. Netbeans has macros, and I have recorded a macro for this, and I like it a lot :) (just click the red circle toolbar button (start record macro),then type -> into the editor (thats all the macro will do, insert the arrow into the editor), then click the gray square (stop record macro) and assign the 'Ctrl dot' shortcut to it, or whatever shortcut you like) The php plugin: The php plugin, would also have to have a different string concatenation operator than the dot. Maybe a double dot ? Yea... why not. All it has to do is set an activation tag so that it doesnt replace / interpreter '.' as '->' for old scripts and scripts that dont intent do use this. Something like this: <php+ $obj.i = 5 ?> (notice the modified '<?php' tag to '<?php+' ) This way it wouldnt break old code. (and you can just add the '<?php+' code template to your editor and then type 'php tab' (for netbeans) and it would insert '<?php+' ) With the alternative syntax method you could even have old and new syntax cohabitating on the same page like this (I am illustrating this to show the great compatibility of this method, not because you would want to do this): <?php+ $obj.i = 5; ?> <?php $obj->str = 'a' . 'b'; ?> You could change the tag to something more explanatory, in case somebody who doesnt know about the plugin reads the script and thinks its a syntax error <?php-dot.com $obj.i = 5; ?> This is easy because most editors have code templates, so its easy to assign a shortcut to it. And whoever doesnt want the dot replacement, doesnt have to use it. These are NOT ultimate solutions, they are ONLY examples to show that solutions exist, and that arguments against replacing '->' with '.' are only excuses. (Just admit you like the arrow, its ok : ) With this potential method, nobody who doesnt want to use it would have to use it, and it wouldnt break old code. And if other problems (ahem... excuses) arise, they could be fixed too. So who can, and who will do such a thing ?

    Read the article

  • how do copyright permission systems for content hosting sites work?

    - by zebraman
    I am wondering about subscription sites that host content, like recorded performances from concerts. I'm sure there is a tangle of copyright permissions that must be granted for these video/audio files to be hosted. For example, if a band plays a cover of another band's song, permission must be obtained from not only the band that performed, but the band that owns the song. Perhaps even from the venue that hosted the performance, to record the video and post the content. I am curious how websites that host content like this work. How might an automated copyright system work to keep track of who has ownership of certain performances and obtain permission from said owners to record and post their content.

    Read the article

  • MapReduce results seem limited to 100?

    - by user1813867
    I'm playing around with Map Reduce in MongoDB and python and I've run into a strange limitation. I'm just trying to count the number of "book" records. It works when there are less than 100 records but when it goes over 100 records the count resets for some reason. Here is my MR code and some sample outputs: var M = function () { book = this.book; emit(book, {count : 1}); } var R = function (key, values) { var sum = 0; values.forEach(function(x) { sum += 1; }); var result = { count : sum }; return result; } MR output when record count is 99: {u'_id': u'superiors', u'value': {u'count': 99}} MR output when record count is 101: {u'_id': u'superiors', u'value': {u'count': 2.0}} Any ideas?

    Read the article

  • Drop Down Box (select) set URL on postback?

    - by jamone
    I have a page with a ASP.NET DropDownBox control (HTML select) that's populated with some dynamic record values. When the user selects a record the entire contents of the page is updated to reflect the selection. If a user clicks a link and leaves the page and tries to go back, it pulls up the default unselected list, and they have to reselect it again. How would be the best way to retain their selection? I currently have the page set so if the url contains PageName.aspx?recordID=5 it will select the correct dropDown option. However I'm not sure how to change the URL's query string based on the selection.

    Read the article

  • LinkQ Exception

    - by Ravi
    Hi, I write Linq query for keep on fetching data from database. First loop table don't have record , so throwing exception. After first loop i have record in the database, my query is working properly. Below i specified my query give some suggestion first loop(no records in table) i have to modify query or query have to change. Ex: forloop(History history in historyList) { History history1 = (from p in context.History where p.TransferCode == history.TransferCode select p).First<History>() as History; if(history1 == null) { SaveToDataBase(history); } else { UpdateToDataBase(history1); } } Thinks

    Read the article

  • problems with matlab wavrecord and wavread

    - by user504363
    Hi all I have a problem in matlab I want to record a speech for 2 seconds then read the recorded sound and plot it I use the code FS = 8000; new_wav = wavrecord(2*FS,FS,'int16'); x = wavread(new_wav); plot(x); but the error appears ??? Error using ==> fileparts at 20 Input must be a row vector of characters. Error in ==> wavread>open_wav at 193 [pat,nam,ext] = fileparts(file); Error in ==> wavread at 65 [fid,msg] = open_wav(file); Error in ==> test at 2 x = wavread(new_wav); I plotted correctly recorded sound files, but when I want to record new one through matlab I get this errors. I tried many ways by changing FS and 'int16' but nothing happens. thanks

    Read the article

  • How to get comma-separated values in Linq?

    - by Mujtaba Hassan
    I have the query below: var users = (from a in dc.UserRoles join u in dc.Users on a.intUserId equals u.ID join r in dc.Roles on a.intRoleId equals r.ID where r.intClientId == clientID select new UserRoleDetail { ID = a.ID, intUserId = a.intUserId, intRoleId = a.intRoleId, Name =u.FullName, //Here I need comma separated values. intAssignedById = a.intAssignedById, RoleName = r.vchName, Function = u.vchFunction }); I require all the values of "Name =u.FullName" to be comma-separated in a single record group by intRoleId. I mean for every role I need all the usernames in a sigle record comma separated. Any suggestion?

    Read the article

  • display image on a report based on two date

    - by Yongwei Xing
    Hi all I am using sql server 2005 reporting service to generate report base on a database. There are two columns which are datetime type ColumnA and ColumnB. The report would display a KPI image on this report by comparing these two columns.Below is the expression for selecting image SWITCH(DateDiff("d",Fields!ColumnA.Value,Fields!ColumnB.Value)<0,"kpi_r", DateDiff("d",Fields!ColumnA.Value,Fields!ColumnB.Value)>0,"kpi_g", DateDiff("d",Fields!ColumnA.Value,Fields!ColumnB.Value)=0,"kpi_y") For most of the records, the image is correct. Only for one record, the result is very strange. For this record ColumnA=2010-04-23 08:00:00 ColumnB=2010-04-22 17:00:00 It would display kpi_r, it displayed kpi_y. I have checked the value of DateDiff(d,Fields!ColumnA.Value,Fields!ColumnB.Value) in the SSMS, the value is -1. Why does it display kpi_y? Does anyone meet this problem before? Best Regards,

    Read the article

  • Pushing View from UITableView Problem

    - by golfromeo
    Basically, what I want is to be able to press a record in a table, and have it push to another view. To do this, I created a nib file and a UIViewController subclass (for the "pushed" view). I set the nib file's "File Owner" to be the controller I created. Then, in the view controller of the table that will push that view, I set the didSelectRowIndexAtPath: method to include the following: SearchTableController *vc = [[SearchTableController alloc] initWithNibName:@"SearchTable" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:vc animated:YES]; [vc release]; (where "SearchTableController" is the name of the UIViewController subclass and "SearchTable" is the name of the nib file) However, when I run this code and click on the record, nothing happens- the app doesn't crash, but the view doesn't get pushed. The code is getting run, because it works when I NSLog(), but it doesn't seem to be pushing the view. Thanks for any help in advance.

    Read the article

  • Can't send flash message from Model method

    - by Andy
    Hello, I'm trying to prevent a record that has a relationship to another record from being deleted. I can stop the deletion but not send a flash message as I had hoped! class Purchaseitem < ActiveRecord::Base before_destroy :check_if_ingredient ... def check_if_ingredient i = Ingredient.find(:all, :conditions => "purchaseitem_id = #{self.id}") if i.length > 0 self.errors.add(:name) flash.now[:notice] = "#{self.name} is in use as an ingredient and cannot be deleted" return false end end This will prevent a the delete wihthout the flash line, and when I add it I get: undefined local variable or method `flash' for # Any help would be much appreciated!

    Read the article

  • mail function in windows application

    - by Ranjana
    i have used a mail function. after inserting every record simultaneously from multiple PC. I have set a timer which ticks for every 2 min. while it ticks it start to check the record and it send the mail. i have used background worker for that.in Bgdworker the mail fn will be called. private void timer_Startsendingemail_Tick(object sender, EventArgs e) { if (!bgw_startsendingemail.IsBusy) bgw_startsendingemail.RunWorkerAsync(); } private void bgw_startsendingemail_DoWork(object sender, DoWorkEventArgs e) { sendingMail(); sendingsms(); } in sendingmail() fn the datas fetch from database and send the mail based on email settings to all the inserted rec. but the prob is the timer triggered for 2 min often , and the process will be working fine and nothing there in log file but sometime the mail is not received by the clients.how to fix the prob. how to find out where it is strucked... its hard to find the problem. any idea over this??????????/

    Read the article

  • Strange IP addresses in tomcat

    - by mdev
    Some where I have this in some generic class. public static String getRequestIp (HttpServletRequest request){ String ipaddr = request.getHeader("X-FORWARDED-FOR"); if (ipaddr == null)ipaddr = request.getRemoteAddr(); return ipaddr; } For every request i call that method and in a certain moment i insert a record in a mysql database. In most cases it works normally and i can see a record for every request with a valid ip address in the right field. But sometimes where the IP should be there is something like this. "unknown, 93.186.30.120" or "10.0.1.169, 186.38.84.3" Apache is at the front listening at port 80 and used as proxy to Tomcat that listens at port 8081. My router config would not allow to pass any conection that come by any port other than 80. Any Help? Thanks in advance.

    Read the article

  • Need help to format the result page after searching

    - by kshama
    Hi, I have built a small text based search engine on ROR which will display relevant records having a specified search word in it.since few of the records has more than 1000 words i have truncated each result set to 200 characters.My views file search.html.erb looks like this <% @results_with_ranks.each do |result| -%> <% content_id = rtable.find(result[0]).content_id %> <% content= Content.find(content_id) %> <%= truncate content.body, :length => 200 %><br/> <p> Record id <%= content.id %></p> <hr style="color:blue"> <% end -%> I want to provide an option so that whenever any truncated record is selected its entire body has to be displayed. I also want to paginate the result page displaying some fixed number of records per page.Can any body help me in doing this? Thanks in advance.

    Read the article

  • Hibernate Auto-Increment not working

    - by dharga
    I have a column in my DB that is set with Identity(1,1) and I can't get hibernate annotations to work for it. I get errors when I try to create a new record. In my entity I have the following. @GeneratedValue(strategy=GenerationType.IDENTITY, generator="native") @Column(name="SeqNo", unique=true, nullable=false) BigDecimal seqNo; But when I try to add a new record I get the following error. Cannot insert explicit value for identity column in table 'MemberSelectedOptions' when IDENTITY_INSERT is set to OFF. I don't want to set IDENTIY_INSERT to ON because I want the identity column in the db to manage the values. The SQL that is run is the following; where you can clearly see the insert. insert into dbo.MemberSelectedOptions (OptionStatusCd, EffectiveDate, TermDate, SelectionStatusDate, SysLstUpdtUserId, SysLstTrxDtm, SourceApplication, GroupId, MemberId, OptionId, SeqNo) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) What am I missing?

    Read the article

  • Are there issues with tables using an autonumber as a primary key in a back-end ms access db?

    - by owlie
    I inherited an MS Access database at my office that is heavily used by several people over the network. This causes many issues with data collisions and locks. I want to split the db so that each user has thier own front-end app and maintain the core data on the server. Several of the tables use an autonumber:sequence:long as thier primary key - in researching how to perform the split I've come across several posts that hint this can cause issues when distributing a database but I haven't been able to find anything solid. The issue seems to be that a user can begin a new record and receive the next autonumber but a second user can create a new record within a short interval and receive the same autonumber resulting in an error? Does Jet handle this correctly or are there autonumber issues with a FE/BE database? If it's an unlikely-but-possile occurance I'm sure it will still be much better than what my users are currently experiencing but I'd like to know if there are ways I can minimize such issues. Thanks for your help!

    Read the article

  • Multiple column subselect in mysql 5 (5.1.42)

    - by rubber boots
    This one seems to be a simple problem, but I can't make it work in a single select or nested select. Retrieve the authors and (if any) advisers of a paper (article) into one row. I order to explain the problem, here are the two data tables (pseudo) papers (id, title, c_year) persons (id, firstname, lastname) plus a link table w/one extra attribute (pseudo): paper_person_roles( paper_id person_id act_role ENUM ('AUTHOR', 'ADVISER') ) This is basically a list of written papers (table: papers) and a list of staff and/or students (table: persons) An article my have (1,N) authors. An article may have (0,N) advisers. A person can be in 'AUTHOR' or 'ADVISER' role (but not at the same time). The application eventually puts out table rows containing the following entries: TH: || Paper_ID | Author(s) | Title | Adviser(s) | TD: || 21334 |John Doe, Jeff Tucker|Why the moon looks yellow|Brown, Rayleigh| ... My first approach was like: select/extract a full list of articles into the application, eg.SELECT q.id, q.title FROM papers AS q ORDER BY q.c_year and save the results of the query into an array (in the application). After this step, loop over the array of the returned information and retrieve authors and advisers (if any), via prepared statement (? is the paper's id) from the link table like:APPLICATION_LOOP(paper_ids in array) SELECT p.lastname, p.firstname, r.act_role FROM persons AS p, paper_person_roles AS r WHERE p.id=r.person_id AND r.paper_id = ? # The application does further processing from here (pseudo): foreach record from resulting records if record.act_role eq 'AUTHOR' then join to author_column if record.act_role eq 'ADVISER' then join to avdiser_column end print id, author_column, title, adviser_column APPLICATION_LOOP This works so far and gives the desired output. Would it make sense to put the computation back into the DB? I'm not very proficient in nontrivial SQL and can't find a solution with a single (combined or nested) select call. I tried sth. like SELECT q.title (CONCAT_WS(' ', (SELECT p.firstname, p.lastname AS aunames FROM persons AS p, paper_person_roles AS r WHERE q.id=r.paper_id AND r.act_role='AUTHOR') ) ) AS aulist FROM papers AS q, persons AS p, paper_person_roles AS r in several variations, but no luck ... Maybe there is some chance? Thanks in advance r.b.

    Read the article

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