Search Results

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

Page 155/296 | < Previous Page | 151 152 153 154 155 156 157 158 159 160 161 162  | Next Page >

  • Routing error when trying to use same view for update and create flows (Rails 3)

    - by Jamis Charles
    My overall use case: I have a Listing model that has many images. The Listing detail page lists all the fields that can be updated inline (through ajax). I want to be able to use the same view for both update listing and create new listing. My listing controller looks as follows: def detail @listing = Listing.find(params[:id]) @image = Image.new #should this link somewhere else? respond_to do |format| format.html # show.html.erb format.xml { render :xml => @listing } end end def create # create a new listing and save it immediately. Assign it to guest, with a status of "draft" @listing = Listing.new(:price_id => 1) # Default price id # save it to db # TODO add validation that it has to have a price ID, on record creation. So the view doesn't break. @listing.save @image = Image.new # redirect_to "/listings/detail/@listing.id" #this didn't work respond_to do |format| format.html # show.html.erb format.xml { render :xml => @listing } end end The PROBLEM I'm using a partial that shows the same form for the create view and the detail view. This works perfectly except for one thing: When I pull up http://0.0.0.0:3000/listings/detail/7, it works perfectly. When I pull up http://0.0.0.0:3000/listings/new, I get the following error: Showing /Applications/MAMP/htdocs/rails_testing/feedbackd/app/views/listings/_edit_form.html.erb where line #100 raised: No route matches {:action="show", :controller="images"} Extracted source (around line #100): 97: <!-- Form for new images --> 98: <div class="span-20 append-bottom"> 99: <!-- <%# form_for :image, @image, :url => image_path, :html => { :multipart => true } do |f| %> --> 100: <%= form_for @image, :url => image_path, :html => { :multipart => true } do |f| %> 101: <%= f.text_field :description %><br /> 102: <%= f.file_field :photo %> 103: <%= submit_tag "Upload" %> What I think the issue is: When I upload a new image (I'm using Paperclip), it requires the listing_id to create the image record. Since the listing_id isn't passed in with listings/new it can't find the listing_id. How can I pass in the id? Via a redirect? What's the best way to solve this? Thank you.

    Read the article

  • Error in OnClientClick in C#?

    - by Champ
    I want a popup to be populated to user before deleting the record I have tried OnClientClick and class to handle it with JavaScript/jQuery but with no success ERROR Type 'System.Web.UI.WebControls.HyperLinkField' does not have a public property named 'OnClientClick'. Control <asp:HyperLinkField OnClientClick="return confirm('Are you sure you would like to delete the selected landing page?')" datanavigateurlfields="id" datanavigateurlformatstring="ViewLandingPages.aspx?id={0}&delete=yes" HeaderText="Delete" Text="Delete" /> EDIT : also tried adding a class (for handling it with jquery ) but with no success

    Read the article

  • Updating gridview using ado.net entity framework

    - by Ravi
    Hello everyone, I am trying to figure out the best way of getting the record and update in to gridview using ado.net entity framework in C#. I need implement Next & Previous button in gridview and based on pagesize i want to navigate records using Next&Back button. Any one give simple example for this context.

    Read the article

  • Updating several records at once using Django

    - by 47
    I want to create a list of records with checkboxes on the left side....kinda like the inbox in Gmail. Then if a user selects some or all of these checkboxes, then the selected record(s) can be updated (only one field will be updated BTW), possibly by clicking a button. I'm stuck on how to do this though....ideas?

    Read the article

  • Delphi, read data from 3rd party data field

    - by donaldadams1951
    I am writing an application that needs to read a data field on another Delphi program and I do not have access to the source code of the 3rd party program. The data field contains the "foreign key" to a record I need to retrieve or create in my application. I would appreciate any links to knowledge or components that will help me with my program.

    Read the article

  • Problem in sql query

    - by Vishwa
    Hi I have 2 tables Order and orderDetails table... I have written a inner join SELECT Order.id FROM Order INNER JOIN orderDetails ON Order.id=orderDetails.id I have got the output as id 100 100 100 101 101 from the above data i want the count of each record OUTPUT AS : id count 100 3 101 2 help me i am new to sql

    Read the article

  • Alternatives of Datatable

    - by mavera
    In my web application, I have a dynamic query that returns huge data to datatable, and this query is often recalled with different parameters. So database is exhausted. I want to get all record with no parameters to an object, and perform queries (may be with linq) on this object. So database will not be exthausted. Which objects can be used instead of datatable?

    Read the article

  • Questions About SQl BulkCopy

    - by chobo2
    Hi I am wondering how can do a mass insert and bulk copy at the same time? I have 2 tables that should be affect by the bulk copy as they both depend on each other. So I want it that if while inserting table 1 a record dies it gets rolled back and table 2 never gets updated. Also if table 1 inserts good and table 2 an update fails table 1 gets rolled back. Can this be done with bulk copy?

    Read the article

  • Recipe for creating a corrupt mysql table

    - by Chaim Geretz
    We had a process that crashed while trying to manipulate an expected mysql record set, running the offending query from the mysql cli showed the following. mysql SELECT ...; ERROR 1030: Got error 127 from table handler Is there a way to easily recreate this condition so we can validate our fix ? (production DB was already repaired).

    Read the article

  • Program for WIndows Embedded

    - by Syma
    Hi, We have request from our clients to provide a POS terminal version of our web-based software. They want to be able to enter record to their database from POS terminal (via web service) instead of using PC browser. I am the one to develop this application, as I am the lead developer of the main application. I haven't done any Windows embedded programming or .net compact edition before and would appreciate link to good tutorial or info on how to start developing for Windows CE 6.0 enabled POS terminal or device. Thanks

    Read the article

  • Is a clear and replace more efficient than a loop checking all records?

    - by Matt
    I have a C# List, that is filled from a database.. So far its only 1400 records, but I expect it to grow a LOT.. Routinely I do a check for new data on the entire list.. What I'm trying to figure out is this, is it faster to simply clear the List and reload all the data from the table, or would checking each record be faster.. Intuition tells me that the dump and load method would be faster, but I thought I should check first...

    Read the article

  • Pass windows authentication username to asp variable

    - by Darren Cook
    Hi, I have a site that processes orders taken by phone into a SQL database. Access to the portal uses Windows Authentication and I would like to pass the username of the order processor along with the order so that I can record who has taken the order. How can I pass the user name to a form element? The pages are written in classic asp. Thanks.

    Read the article

  • Which MS technologies would be suited for a data intensive application?

    - by steve.tse
    I'm a junior VB.net developer with little application design knowledge. I've been reading a lot of material online regarding different design patterns, frameworks, and methodologies. It's become a bit confusing for me. Right now I'm trying to decide on what language would be best suited to convert an existing VB6 application (with SQL server backend.) I need to update the UI and add more user functionality and reporting capabilities. Initially I was thinking of using WPF and attempting the MVVM model for this big project. Reports would be generated from SSRS. A peer suggested using ASP.net and I don't have enough experience to determine what would be better. The senior programmers here are stuck on using VB6 and don't have any input on what to use. They are encouraging me to use the latest technologies. This application would be for ~20 users in a central location. Ideally I would stick to a Microsoft .net language. Current interface is similar to a datagrid table where the user would click in to see the detail of each record. They would need to have multiple records open at any given time. I look forward to all the advice I can get. EDIT 2010/04/22 2:47 PM EST What is your audience? Internal clients within an intranet How complex are the interactions you expect to implement? not very... displaying data from SQL server to UI. Allow user updates to said data. Typically just one user modifying a record. Do you require near real-time data updates? no How often do you expect to update the application after the first release? twice/year Do you expect a well-defined set of client platforms? Yes, windows xp environment, potentially upgrading to Win7. Currently in IE.6 moving to IE7 or 8 within a couple of months. Do users need access from anywhere? No, just from their PC.

    Read the article

  • Why does 99.99 / 100 = 0.9998999999999999

    - by the-locster
    Whereas 99.99 * 0.01 = 0.99 Clearly this is the age old floating point rounding issue, however the rounding error in this case seems quite large to me; what I mean is I might have expected a result of 0.99990000001 or some similar 'close' result. And for the record I got the same answer in a JavaVM and in a .Net environment.

    Read the article

  • RETS data fetching problem.

    - by Jimit
    Hello everyone, I am working on one real estate website which is Using RETS service to get the data to my local server. but I have one little bit problem here,I can fetch data from RETS which is having about 3lacks record in RETS Database but I didn't find the way,How can I fetch that all records in bunch of 50k at a time ? I didn't find any 'LIMIT' keyword on RETS.so how can I fetch without 'LIMIT' 50k records at a time? Please help me.

    Read the article

  • c#: storing lots of data in my.settings

    - by every_answer_gets_a_point
    i will need to store 3 tables of data instead of implementing an entire database backend, i just want to store the record for these tables in application.settings has anyone done this before? i dont care about security is it advisable to do it with application settings? how else would you do it? perhaps storing a matrix in application.settings would be OK?

    Read the article

  • How to evaluate the string in ruby if the string contains ruby command?

    - by Arun
    In my case, I was storing the sql query in my database as text. I am showing you one record which is present in my database Query.all :id => 1, :sql => "select * from user where id = #{params[:id]}" str = Query.first Now 'str' has value "select * from user where id = #{params[:id]}" Here, I want to parsed the string like If my params[:id] is 1 then "select * from user where id = 1" I used eval(str). Is this correct?

    Read the article

  • Subsonic3 pre-generate code files

    - by silverfox1948
    I need to pre-generate my active record files, rather than have subsonic build them dynamically. I used to be able to do this using SubSonicCentral in SubSonic 2.x. How do I do this in SubSonic 3? I don't see a generator executable when I download the 3.0.0.4 zip file.

    Read the article

  • Limiting XML read to 5 records

    - by Jean
    Hello, I have a xml file with 100 records, but I want it to limit it to just 5 records for ($i=0;$i<=5;$i++) { foreach($xml-entry as $result){ if ($result->updated == $result->published) { } } } When I put in the above code, it display one record 5 times. Thanks Jean

    Read the article

  • Selenium tests: html vs code?

    - by gustavogb
    Is it better to write/record selenium tests in html format and run them directly in the server with "-htmlSuite" or to write the tests in java/C#/... and run them in the server using selenium-rc? What is the recommended solution?

    Read the article

< Previous Page | 151 152 153 154 155 156 157 158 159 160 161 162  | Next Page >