Search Results

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

Page 117/296 | < Previous Page | 113 114 115 116 117 118 119 120 121 122 123 124  | Next Page >

  • Regarding Toplink Fetching Policy

    - by Chandu
    Hi, I'm working for a Swing Project and the technologies used are netbeans with Toplink essentials, mysql. The Problem I'm facing is the entity object dosn't get updated after insertions take place while calling a getter collection of the foreign key property. Ex: I have 2 tables Table1,Table2. I have sno column, id column as a primary key in Table1 & is Foreign Key in Table2. Through find method I just get the particular sno object(existed in table 1) set some values persisted to table2 & committed the transaction. When I select the same sno object through find method & gets its collection from Table2 through the getTable2Collection() of the bean(as it is already created in bean by toplink essential) I'm unable to get the latest added record except that all other records of it are displayed. After I close the application & opening it then the new record gets reflected while calling the same sno through the above process. I came to know that this is a kind of lazy fetching and there should be some way of fetch policy to be changed to make the entity object get updated with the changes. So Please help me in this regard. Regards, Chandu

    Read the article

  • Flush separate Castle ActiveRecord Transaction, and refresh object in another Transaction

    - by eanticev
    I've got all of my ASP.NET requests wrapped in a Session and a Transaction that gets commited only at the very end of the request. At some point during execution of the request, I would like to insert an object and make it visible to other potential threads - i.e. split the insertion into a new transaction, commit that transaction, and move on. The reason is that the request in question hits an API that then chain hits another one of my pages (near-synchronously) to let me know that it processed, and thus double submits a transaction record, because the original request had not yet finished, and thus not committed the transaction record. So I've tried wrapping the insertion code with a new SessionScope, TransactionScope(TransactionMode.New), combination of both, flushing everything manually, etc. However, when I call Refresh on the object I'm still getting the old object state. Here's some code sample for what I'm seeing: Post outsidePost = Post.Find(id); // status of this post is Status.Old using (TransactionScope transaction = new TransactionScope(TransactionMode.New)) { Post p = Post.Find(id); p.Status = Status.New; // new status set here p.Update(); SessionScope.Current.Flush(); transaction.Flush(); transaction.VoteCommit(); } outsidePost.Refresh(); // refresh doesn't get the new status, status is still Status.Old Any suggestions, ideas, and comments are appreciated!

    Read the article

  • What is best strategy to handle exceptions & errors in Rails?

    - by Nick Gorbikoff
    Hello. I was wondering if people would share their best practices / strategies on handling exceptions & errors. Now I'm not asking when to throw an exception ( it has been throroughly answered here: SO: When to throw and Exception) . And I'm not using this for my application flow - but there are legitimate exceptions that happen all the time. For example the most popular one would be ActiveRecordNotFound. What would be the best way to handle it? The DRY way? Right now I'm doing a lot of checking within my controller so if Post.find(5) returns Nil - I check for that and throw a flash message. However while this is very granular - it's a bit cumbersome in a sense that I need to check for exceptions like that in every controller, while most of them are essentially the same and have to do with record not found or related records not found - such as either Post.find(5) not found or if you are trying to display comments related to post that doesn't exist, that would throw an exception (something like Post.find(5).comments[0].created_at) I know you can do something like this in ApplicationController and overwrite it later in a particular controller/method to get more granular support, however would that be a proper way to do it? class ApplicationController < ActionController::Base rescue_from ActiveRecord::RecordInvalid do |exception| render :action => (exception.record.new_record? ? :new : :edit) end end

    Read the article

  • Combo-box values automatically update

    - by glinch
    Hi all, hopefully somebody can help The table structure is as follows: tblCompany: compID compName tblOffice: offID, compID, add1, add2, add3 etc... tblEmployee: empID Name, telNo, etc... offID I have a form that contains contact details for employees, all works ok using after update. A cascading combo box, cmbComp, allows me to select a company, and inturn select the appropriate office, cboOff, and updates the corresponding tblEmployee.offID field correctly. Fields are automatically updated for the address also cmbComp: RowSource SELECT DISTINCT tblOffice.compID, tblCompany.compID FROM tblCompany INNER JOIN AdjusterCompanyOffice ON tblCompany.compID=tblOffice.compID ORDER BY tblCompany.compName; cboOff: RowSource SELECT tblCompany.offID, tblCompany.Address1, tblCompany.Address2, tblCompany.Address3, tblCompany.Address4, tblCompany.Address5 FROM tblCompany ORDER BY tblCompany.Address1; The problem I am having is that when i load a new record how to retrieve the data and automatically load the cmbComp and text fields. The cboOff combo box loads correctly as the control source for this is the offID I imagine there must be a way of setting the value on opening the record? Not sure how though. I dont think I can set the controlsource cmbComp or text fields, or can I? Any help/point in the right direction appreciated, have been searching for a way to do this but cant get anywhere!

    Read the article

  • jQuery ui datepicker positioning problem when scrolling down webpage

    - by Remnant
    I have a webpage that uses multiple instances of the jQuery ui datepicker. My webpage will display ~80 records which extends beyond a single screenshot. <% foreach (var record in Model) { %> <div class="recordname"><%=record.name%></div> <%=Html.TextBox("DateTimePicker", null, new { @class = "date-pick" } )%> // <-- additional html here --> <% } %> I have set the defaults of my datepicker as follows: $(".date-pick").each(function() { $(this).datepicker({ dateFormat: 'dd M yy', showOn: 'button', buttonImage: '/Images/datepickericon.png', buttonImageOnly: true }); }); When the page first loads, if I click any datepicker icon that is visible on screen (i.e. without scrolling) then the datepicker appears as expected. However, if I scroll down the page and then click a datepicker icon, the datepicker does not appear in the screen window but is instead rendered right back near the top of the screen. Any ideas how to solve this? I am using: IE7 asp.net mvc jquery.ui.datepicker.js (UI/API/1.8/Datepicker)

    Read the article

  • How can I stop an auto-generated Linq to SQL class from loading ALL data?

    - by Gary McGill
    DUPLICATE of http://stackoverflow.com/questions/2433422/how-can-i-stop-an-auto-generated-linq-to-sql-class-from-loading-all-data post answers there! I have an ASP.NET MVC project, much like the NerdDinner tutorial example. (I'm using MVC 2, but followed the NerdDinner tutorial in order to create it). As per the instructions in part 3 of the tutorial, I've created a Linq-to-SQL model of my database by creating a "Linq to SQL Classes" (.dbml) surface, and dropping my database tables onto it. The designer has automatically added relationships between the generated classes based on my database tables. Let's say that my classes are as per the NerdDinner example, so I have Dinner and RSVP tables, where each Dinner record is associated with many RSVP records - hence in the generated classes, the Dinner object has a RSVPs property which is a list of RSVP objects. My problem is this: it appears (and I'd be gladly proved wrong on this) that as soon as I access a Dinner object, it's loading all of the corresponding RSVP objects, even if I don't use the RSVPs member. First question: is this really the default behavior for the generated classes? In my particular situation, the object graph contains many more tables (which have an order of magnitude more records), and so this is disastrous behaviour - I'd be loading tons of data when all I want to do is show the details of a single parent record. Second question: are there any properties exposed through the designer UI that would let me modify this behavior? (I can't find any). Third question: I've seen a description of how to control the loading of related records in a DataContext by using a DataShape object associated with the DataContext. Is that what I'm meant to do, and if so are there any tutorials like the NerdDinner one that would show not only how to do it, but also suggest a 'pattern' for normal use?

    Read the article

  • How can I stop an auto-generated Linq to SQL class from loading ALL data?

    - by Gary McGill
    I have an ASP.NET MVC project, much like the NerdDinner tutorial example. (I'm using MVC 2, but followed the NerdDinner tutorial in order to create it). As per the instructions in part 3 of the tutorial, I've created a Linq-to-SQL model of my database by creating a "Linq to SQL Classes" (.dbml) surface, and dropping my database tables onto it. The designer has automatically added relationships between the generated classes based on my database tables. Let's say that my classes are as per the NerdDinner example, so I have Dinner and RSVP tables, where each Dinner record is associated with many RSVP records - hence in the generated classes, the Dinner object has a RSVPs property which is a list of RSVP objects. My problem is this: it appears (and I'd be gladly proved wrong on this) that as soon as I access a Dinner object, it's loading all of the corresponding RSVP objects, even if I don't use the RSVPs member. First question: is this really the default behavior for the generated classes? In my particular situation, the object graph contains many more tables (which have an order of magnitude more records), and so this is disastrous behaviour - I'd be loading tons of data when all I want to do is show the details of a single parent record. Second question: are there any properties exposed through the designer UI that would let me modify this behavior? (I can't find any). Third question: I've seen a description of how to control the loading of related records in a DataContext by using a DataShape object associated with the DataContext. Is that what I'm meant to do, and if so are there any tutorials like the NerdDinner one that would show not only how to do it, but also suggest a 'pattern' for normal use?

    Read the article

  • using .NET web service (Dataset) from progress OpenEdge 4GL

    - by jasperdmx
    I created web service in C# .net with input parameter : DataSet in other side, i need to use this web service from progress OpenEdge 4GL 10.1 (not 10.2) the problem is Dataset in OpenEdge cant match with DataSet in .net. always return 0 in the result I'm C# programmer, so dont have deep knowledge in porgress. I did research in progress forum, but not a good result. any help ? thanks in advance. *codes***** //web service : C# .net [webmethod] public int getResult(DataSet ds) { DataTable tbl = ds.Tables["datas"]; int result=0; foreach (DataRow dr in tbl.Rows){ //only 1 record = 1 row result = Convert.toInt32(dr["field1"]); } return result; } //progress OpenEdge 10.1 --- create and fill temp-table : field1 = 30 and only 1 record --- create dataset and bind to temp-table --- connect to web service --- call webmethod : define variable result as integer no-undo. RUN getResult IN hPortType(INPUT dataset,OUTPUT result). message result view-as alert-box info button ok. --- RESULT ALWAYS 0 /****/ anyone know how to "bridge" dataset in progress openedge to .net dataset ? note: this web service works well if called from .net

    Read the article

  • PostgreSQL - Why are some queries on large datasets so incredibly slow

    - by Brad Mathews
    Hello, I have two types of queries I run often on two large datasets. They run much slower than I would expect them to. The first type is a sequential scan updating all records: Update rcra_sites Set street = regexp_replace(street,'/','','i') rcra_sites has 700,000 records. It takes 22 minutes from pgAdmin! I wrote a vb.net function that loops through each record and sends an update query for each record (yes, 700,000 update queries!) and it runs in less than half the time. Hmmm.... The second type is a simple update with a relation and then a sequential scan: Update rcra_sites as sites Set violations='No' From narcra_monitoring as v Where sites.agencyid=v.agencyid and v.found_violation_flag='N' narcra_monitoring has 1,700,000 records. This takes 8 minutes. The query planner refuses to use my indexes. The query runs much faster if I start with a set enable_seqscan = false;. I would prefer if the query planner would do its job. I have appropriate indexes, I have vacuumed and analyzed. I optimized my shared_buffers and effective_cache_size best I know to use more memory since I have 4GB. My hardware is pretty darn good. I am running v8.4 on Windows 7. Is PostgreSQL just this slow? Or am I still missing something? Thanks! Brad

    Read the article

  • executing stored procedure from Spring-Hibernate using Annotations

    - by HanuAthena
    I'm trying to execute a simple stored procedure with Spring/Hibernate using Annotations. Here are my code snippets: DAO class: public class UserDAO extends HibernateDaoSupport { public List selectUsers(final String eid){ return (List) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { Query q = session.getNamedQuery("SP_APPL_USER"); System.out.println(q); q.setString("eid", eid); return q.list(); } }); } } my entity class: @Entity @Table(name = "APPL_USER") @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorFormula(value = "SUBSCRIBER_IND") @DiscriminatorValue("N") @NamedQuery(name = "req.all", query = "select n from Requestor n") @org.hibernate.annotations.NamedNativeQuery(name = "SP_APPL_USER", query = "call SP_APPL_USER(?, :eid)", callable = true, readOnly = true, resultClass = Requestor.class) public class Requestor { @Id @Column(name = "EMPL_ID") public String getEmpid() { return empid; } public void setEmpid(String empid) { this.empid = empid; } @Column(name = "EMPL_FRST_NM") public String getFirstname() { return firstname; } ... } public class Test { public static void main(String[] args) { ApplicationContext ctx = new ClassPathXmlApplicationContext( "applicationContext.xml"); APFUser user = (APFUser)ctx.getBean("apfUser"); List selectUsers = user.getUserDAO().selectUsers("EMP456"); System.out.println(selectUsers); } } and the stored procedure: create or replace PROCEDURE SP_APPL_USER (p_cursor out sys_refcursor, eid in varchar2) as empId varchar2(8); fname varchar2(50); lname varchar2(50); begin empId := null; fname := null; lname := null; open p_cursor for select l.EMPL_ID, l.EMPL_FRST_NM, l.EMPL_LST_NM into empId, fname, lname from APPL_USER l where l.EMPL_ID = eid; end; If i enter invalid EID, its returning empty list which is OK. But when record is there, following exception is thrown: Exception in thread "main" org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not execute query; bad SQL grammar [call SP_APPL_USER(?, ?)]; nested exception is java.sql.SQLException: Invalid column name Do I need to modify the entity(Requestor.class) ? How will the REFCURSOR be converted to the List? The stored procedure is expected to return more than one record.

    Read the article

  • calling a stored proc over a dblink

    - by neesh
    I am trying to call a stored procedure over a database link. The code looks something like this: declare symbol_cursor package_name.record_cursor; symbol_record package_name.record_name; begin symbol_cursor := package_name.function_name('argument'); loop fetch symbol_cursor into symbol_record; exit when symbol_cursor%notfound; -- Do something with each record here, e.g.: dbms_output.put_line( symbol_record.field_a ); end loop; CLOSE symbol_cursor; When I run this from the same DB instance and schema where package_name belongs to I am able to run it fine. However, when I run this over a database link, (with the required modification to the stored proc name, etc) I get an oracle error: ORA-24338: statement handle not executed. The modified version of this code over a dblink looks like this: declare symbol_cursor package_name.record_cursor@db_link_name; symbol_record package_name.record_name@db_link_name; begin symbol_cursor := package_name.function_name@db_link_name('argument'); loop fetch symbol_cursor into symbol_record; exit when symbol_cursor%notfound; -- Do something with each record here, e.g.: dbms_output.put_line( symbol_record.field_a ); end loop; CLOSE symbol_cursor;

    Read the article

  • Empty data problem - data layer or DAL?

    - by luckyluke
    I designing the new App now and giving the following question a lot of thought. I consume a lot of data from the warehouse, and the entities have a lot of dictionary based values (currency, country, tax-whatever data) - dimensions. I cannot be assured though that there won't be nulls. So I am thinking: create an empty value in each of teh dictionaries with special keyID - ie. -1 do the ETL (ssis) do the correct stuff and insert -1 where it needs to let the DAL know that -1 is special (Static const whatever thing) don't care in the code to check for nullness of dictionary entries because THEY will always have a value But maybe I should be thinking: import data AS IS let the DAL do the thinking using empty record Pattern still don't care in the code because business layer will have what it needs from DAL. I think is more of a approach thing but maybe i am missing something important here... What do You think? Am i clear? Please don't confuse it with empty record problem. I do use emptyCustomer think all the time and other defaults too.

    Read the article

  • how to insert multiple rows using cakephp

    - by Paul
    In the cakePHP project I'm building, I want to insert a defined number of identical records. These will serve as placeholders records that will have additional data added later. Each record will insert the IDs taken from two belongs_to relationships as well as two other string values. What I want to do is be able to enter a value for the number of records I want created, which would equate to how many times the data is looped during save. What I don't know is: 1) how to setup a loop to handle a set number of inserts 2) how to define a form field in cakePHP that only sets the number of records to create. What I've tried is the following: function massAdd() { $inserts_required = 1; while ($inserts_required <= 10) { $this->Match->create(); $this->Match->save($this->data); echo $inserts_required++; } $brackets = $this->Match->Bracket->find('list'); $this->set(compact('brackets')); } What happens is: 1) at the top of the screen, above the doc type, the string 12345678910 is displayed, this is displayed on screen 2) a total of 11 records are created, and only the last record has the values passed in the form. I don't know why 11 records as opposed to 10 are created, and why only the last records has the entered form data? As always, your help and direction is appreciated. -Paul

    Read the article

  • PDO lastInsertId issues, php

    - by Kyle Hudson
    Hi Guys, I have tried lots of ways to get the last inserted ID with the code below (snipplet from larger class) and now I have given up. Does anyone know howto get PDO lastInsertId to work? Thanks in advance. $sql = "INSERT INTO auth (surname, forename, email, mobile, mobilepin, actlink, regdate) VALUES (:surname, :forename, :email, :mobile, :mobpin, :actlink, NOW())"; $stmt = $this->dbh->prepare($sql); if(!$stmt) { return "st"; } $stmt->bindParam(':surname', $this->surname); $stmt->bindParam(':forename', $this->forename); $stmt->bindParam(':email', $this->email); $stmt->bindParam(':mobile', $this->mobile); $stmt->bindParam(':mobpin', $this->mobilePin); $stmt->bindParam(':actlink', $this->actlink); $result = $stmt->execute(); //return var_dump($result); $arr = array(); $arr = $stmt->errorInfo(); $_SESSION['record'] = 'OK' . $dbh->lastInsertId(); $arr .= $_SESSION['record']; return $arr;

    Read the article

  • Transaction Isolation Level of Serializable not working for me

    - by Shahriar
    I have a website which is used by all branches of a store and what it does is that it records customer purchases into a table called myTransactions.myTransactions table has a column named SerialNumber.For each purchase i create a record in the transactions table and assign a serial to it.The stored procedure that does this calls a UDF function to get a new serialNumber before inserting the record.Like below : Create Procedure mytransaction_Insert as begin insert into myTransactions(column1,column2,column3,...SerialNumber) values( Value1 ,Value2,Value3,...., getTransactionNSerialNumber()) end Create function getTransactionNSerialNumber as begin RETURN isnull(SELECT TOP (1) SerialNumber FROM myTransactions READUNCOMMITTED ORDER BY SerialNumber DESC),0) + 1 end The website is being used by so many users in different stores at the same time and it is creating many duplicate serialNumbers(same SerialNumbers).So i added a Sql transaction with ReadCommitted level to the transaction and i still got duplicate transaction numbers.I changed it to SERIALIZABLE in order to lock the resources and i not only got duplicate transaction numbers(!!HOW!!) but i also got sporadic deadlocks between the same stored procedure calls.This is what i tried : (With ommissions of try catch blocks and rollbacks) Create Procedure mytransaction_Insert as begin SET TRANSACTION ISOLATION LEVEL SERIALIZABLE BEGIN TRASNACTION ins insert into myTransactions(column1,column2,column3,...SerialNumber) values( Value1 ,Value2 , Value3, ...., getTransactionNSerialNumber()) COMMIT TRANSACTION ins SET TRANSACTION ISOLATION READCOMMITTED end I even copied the function that gets the serial number directly into the stored procedure instead of the UDF function call and still got duplicate serialNumbers.So,How can a stored procedure line create something Like the c# lock() {} block. By the way,i have to implement the transaction serial number using the same pattern and i can't change the serialNumber to any other identity field or whatever.And for some reasons i need to generate the serialNumber inside the databse and i can't move SerialNumber generation to application level. Thank you.

    Read the article

  • Is this a tableView issue or a CoreData Issue

    - by monotreme
    I have a CoreData-driven navigation app and I'm trying to figure out why It's crashing. I've got a hierarchy which is 3 view Controllers deep, all related by coredata relatioships, like this. TableViewA =relationship= TableViewB =relationship= TableViewC I'm honestly a novice at core data and I think my problem lies in the fetched results controller. I have one in TableViewA and another in TableViewB, and no matter how deep I go, the console always cites TableViewB's fetched results controller methods after a crash. Is this the problem? What's happening specifically is if I launch my app and drill down into the hierarchy of one record, let's call it Record1, I can delete sub records to my hearts content. Gone! no problem! But the second I go back to TableViewA and drill down into a different record, let's call that one Record2, and try to delete it's subrecords my app crashes, with the console citing this code from TableViewB as the problem. - (void)controllerWillChangeContent:(NSFetchedResultsController *)controller { // The fetch controller is about to start sending change notifications, so prepare the table view for updates. [self.tableView beginUpdates]; } When I go into the debugger, the specific method it always has a problem with is: if (![x.managedObjectContext save:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } Just a confirmation of my idiocy with CoreData is all I'm looking for I think. Oh and how many ManagedObjectContexts should I have in an app of this type. I've been told I should have separate ones for adding content, which then should re-integrate into the main one. Is this true? Thanks!

    Read the article

  • Rails 2.3 session

    - by Sam Kong
    Hi, I am developing a rails 2.3.2 app. I need to keep session_id for an order record, retrieve it and finally delete the session_id when the order is completed. It worked when I used cookies as session store but it doesn't for active_record store. (I restarted my browser, so no cache issue.) I know rails 2.3 implements lazy session load. I read some info about it but am still confused. Can somebody clarify how I use session_id for such a case? What I am doing is... A user make an order going through several pages. There is no sign-up, neither login. So I keep session_id in the order record so that no other user can access the order. @order = Order.last :conditions = {:id = params[:id], :session_id = session[:session_id] } When the order is finished, I set nil to session_id column. How would you implement such a case in lazy session(and active_record store) environment? Thanks. Sam

    Read the article

  • CakePHP belongsTo relationship with a variable 'model' field.

    - by gomezuk
    I've got a problem with a belongsTo relationship in CakePHP. I've got an "Action" model that uses the "actions" table and belongs to one of two other models, either "Transaction" or "Tag". The idea being that whenever a user completes a transaction or adds a tag, the action model is created to keep a log of it. I've got that part working, whenever a Transaction or Tag is saved, the aftersave() method also adds an Action record. The problem comes when I try to do a find('all') on the Action model, the related Transaction or Tag record is not being returned. actions: id model model_id created I thought I could use the "conditions" parameter in the belongsTo relationship like this: <?php class Action extends AppModel { var $name = 'Action'; var $actsAs = array('Containable'); var $belongsTo = array( 'Transaction' => array( 'foreignKey' => 'model_id', 'conditions' => array("Action.model"=>"Transaction") ), 'User' => array( 'fields' => array('User.username') ), 'Recommendation' => array( 'conditions' => array("Action.model"=>"Recommendation"), 'foreignKey' => 'model_id' ) ); } ?> But that doesn't work. Am I missing something here, are my relationships wrong (I suspect so)? After Googling this problem I cam across something called Polymorphic Behaviour but I'm not sure this will help me.

    Read the article

  • How to group data changes by operation with MySQL triggers

    - by Jan-Henk
    I am using triggers in MySQL to log changes to the data. These changes are recorded on a row level. I can now insert an entry in my log table for each row that is changed. However, I also need to record the operation to which the changes belong. For example, a delete operation like "DELETE * FROM table WHERE type=x" can delete multiple rows. With the trigger I can insert an entry for each deleted row into the log table, but I would like to also provide a unique identifier for the operation as a whole, so that the log table looks something like: log_id operation_id tablename fieldname oldvalue newvalue 1 1 table id 1 null 2 1 table type a null 3 1 table id 2 null 4 1 table type a null 5 2 table id 3 null 6 2 table type b null 7 2 table id 4 null 8 2 table type b null Is there a way in MySQL to identify the higher level operation to which the row changes belong? Or is this only possible by means of application level code? In the future it would also be nice to be able to record the transaction to which an operation belongs. Another question is if it is possible to capture the actual SQL query, besides using the query log. I don't think so myself, but maybe I am missing something. It is of course possible to capture these at the application level, but the goal is to keep intrusions to the application level code as minimal as possible. When this is not possible with MySQL, how is this with other database systems? For the current project it is not an option to use something other than MySQL, but it would be nice to know for future projects.

    Read the article

  • Any suggestions for good automated web load testing tool?

    - by fmunkert
    What are some good automated tools for load testing (stress testing) web applications, that do not use record and replay of HTTP network packets? I am aware that there are numerous load testing tools on the market that record and replay HTTP network packets. But these are unsuitable for my purpose, because of this: The HTTP packet format changes very often in our application (e.g. when we optimize an AJAX call). We do not want to adapt all test scripts just because there is a slight change in HTTP packet format. Our test team shall not need to know any internals about our application to write their test scripts. A tool that replays HTTP packets, however, requires the team to know the format of HTTP requests and responses, such that they can adapt details of the replayed HTTP packets (e.g. user name). The automated load testing tool I am looking for should be able to let the test team write "black box" test scripts such as: Invoke web page at URL http://... . First, enter XXX into text field XXX. Then, press button XXX. Wait until response has been received from web server. Verify that text field XXX now contains the text XXX. The tool should be able to simulate up to several 1000 users, and it should be compatible with web applications using ASP.NET and AJAX.

    Read the article

  • sfJQueryUIPlugin: No Picker for new records

    - by Prasad
    Everyday is a new day with Symfony, but I'm loving it! This morning I installed the sfJQueryUIPlugin. It has very little dependencies & accepts themeRoller styles. However, it has 2 issues: [Feature_Request] There is no way to specify the year range. By default, it shows a 20 year range around the year in the field value. eg. if field value is 1993-01-20, the range will be 1983 to 2003. ??? Has anyone found a way out??? The DatePicker does not appear when the field is empty, Thus it does not show up during new record creation. To solve this, I tried setting up the default value in the date input field (which now appears as a text input) using $this->setDefault('date_of_birth',date('Y-m-d')); ??? Is anybody facing this problem of picker now available during new record creation ??? ??? Also is it the right way to set default value ??? Thanks in advance.

    Read the article

  • Getting minimum - Min() - for DateTime column in a DataTable using LINQ to DataSets?

    - by Jay Stevens
    I need to get the minimum DateTime value of a column in a DataTable. The DataTable is generated dynamically from a CSV file, therefore I don't know the name of that column until runtime. Here is code I've got that doesn't work... private DateTime GetStartDateFromCSV(string inputFile, string date_attr) { EnumerableRowCollection<DataRow> table = CsvStreamReader.GetDataTableFromCSV(inputFile, "input", true).AsEnumerable(); DateTime dt = table.Select(record => record.Field<DateTime>(date_attr)).Min(); return dt; } The variable table is broken out just for clarity. I basically need to find the minimum value as a DateTime for one of the columns (to be chosen at runtime and represented by date_attr). I have tried several solutions from SO (most deal with known columns and/or non-DateTime fields). What I've got throws an error at runtime telling me that it can't do the DateTime conversion (that seems to be a problem with Linq?) I've confirmed that the data for the column name that is in the string date_attr is a date value.

    Read the article

  • XSLT Pagination

    - by dbomb101
    I have created a xslt document which formats an xml document, but I would like the results from the xslt sheet to be paginated. here is the orginal xlst document <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <xsl:for-each select="musicInformation/musicdetails"> <label for="artistname{position()}" id="artistnameLabel{position()}">Artist Name:</label> <span id ="artistname{position()}"><xsl:value-of select="artistname" /></span> <br/> <label for="recordname{position()}" id="recordnameLabel{position()}">Record Name:</label> <span id ="recordname{position()}"><xsl:value-of select="recordname" /></span> <br/> <label for="recordtype{position()}" id="recordtypeLabel{position()}">Record Type:</label> <span id ="recordtype{position()}"><xsl:value-of select="recordtype" /></span> <br/> <label for="format{position()}" id="formatLabel{position()}">Format:</label> <span id ="format{position()}"><xsl:value-of select="format" /></span> <br/> <a href="xmlDetail.php?mid={@m_id}" >See Details</a> <br/><br/> </xsl:for-each> </xsl:template> </xsl:stylesheet>

    Read the article

  • Error in asp.net c# code (mysql database connection)

    - by Ishan
    My code is to update a record if it already exists in database else insert as a new record. My code is as follows: protected void Button3_Click(object sender, EventArgs e) { OdbcConnection MyConnection = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=testcase;User=root;Password=root;Option=3;"); MyConnection.Open(); String MyString = "select fil_no,orderdate from temp_save where fil_no=? and orderdate=?"; OdbcCommand MyCmd = new OdbcCommand(MyString, MyConnection); MyCmd.Parameters.AddWithValue("", HiddenField4.Value); MyCmd.Parameters.AddWithValue("", TextBox3.Text); using (OdbcDataReader MyReader4 = MyCmd.ExecuteReader()) { //** if (MyReader4.Read()) { String MyString1 = "UPDATE temp_save SET order=? where fil_no=? AND orderdate=?"; OdbcCommand MyCmd1 = new OdbcCommand(MyString1, MyConnection); MyCmd1.Parameters.AddWithValue("", Editor1.Content.ToString()); MyCmd1.Parameters.AddWithValue("", HiddenField1.Value); MyCmd1.Parameters.AddWithValue("", TextBox3.Text); MyCmd1.ExecuteNonQuery(); } else { // set the SQL string String strSQL = "INSERT INTO temp_save (fil_no,order,orderdate) " + "VALUES (?,?,?)"; // Create the Command and set its properties OdbcCommand objCmd = new OdbcCommand(strSQL, MyConnection); objCmd.Parameters.AddWithValue("", HiddenField4.Value); objCmd.Parameters.AddWithValue("", Editor1.Content.ToString()); objCmd.Parameters.AddWithValue("", TextBox3.Text); // execute the command objCmd.ExecuteNonQuery(); } } } I am getting the error as: ERROR [42000] [MySQL][ODBC 3.51 Driver][mysqld-5.1.51-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order,orderdate) VALUES ('04050040272009','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&' at line 1 The datatype for fields in table temp_save are: fil_no-->INT(15)( to store a 15 digit number) order-->LONGTEXT(to store contents from HTMLEditor(ajax control)) orderdate-->DATE(to store date) Please help me to resolve my error.

    Read the article

  • Extracting specific nodes from XML using XML::Twig

    - by pratz
    i was trying to extract a particular set of nodes from the following XML structure using XML::Twig, but have been stuck ever since. I need to extract the 'player' nodes from the following structure and do a string match/replace on each of these node values. <pep:record> <agency> <subrecord type="scout"> <isnum>123XXX (print)</isnum> <isnum>234YYY (mag)</isnum> </subrecord> <subrecord type="group"> </subrecord> </agency </record> I tried using the following code, but I get pointed to a hash reference rather than actual string. my $parser = XML::Twig->new(twig_handlers => { isnum => sub { print $_->text."::" }, }); foreach my $rec (split(/::/, $parser->parse($my_xml))) { if ($rec =~ m/print/) { ($print = $rec) =~ s/( \(print\))//; } elsif($rec =~ m/mag/) { ($mag = $rec) =~ s/( \(mag\))//; } }

    Read the article

< Previous Page | 113 114 115 116 117 118 119 120 121 122 123 124  | Next Page >