Search Results

Search found 19688 results on 788 pages for 'con current'.

Page 56/788 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • Porting an IBXpress Interbase 6 app to the current Firebird platform, on Delphi 7?

    - by robsoft
    Just wondering if there are any gotchas to be wary of here. We have a legacy D7 app that we developed several years ago for a client, which uses IBXpress to talk to the open source Interbase 6 build. We're having a number of issues with that platform these days (very slow to connect/start-up on new hardware being the chief one) and the client has okayed spending some time/money moving the database over to Firebird. We really DON'T want to embark upon moving it to D2010 (or D2007 which would be my preference right now) as we figure that we might have to move the database layer from IBXpress to something else to best suit Firebird anyway. And at the end of the day, the client is only looking to lessen the database pain, not overhaul/upgrade/rewrite the app. Given the ancestry of Firebird, is it a fairly painless, well-understood path from IBXpress Interbase 6 to (whatever) with Firebird? We have quite a number of sprocs, triggers (and even datatypes) etc in the existing IB database already (and the client has a number of paying customers all using this platform) so we felt that going to Firebird was more likely to be a smoother move than moving to SQL Express (or another flavour of DB entirely). Note that we're not looking for 'embedded' DB advocacy - in many of our client's customers' installations, the software is used in a multi-user client-server way so keeping that kind of approach is important.

    Read the article

  • How to get a handle/reference to the current controller object inside a rails functional test?

    - by Dave Paroulek
    I must be missing something very simple, but can't find the answer to this. I have a method named foo inside bar_controller. I simply want to call that method from inside a functional test. Here's my controller: class BarsController < ApplicationController def foo # does stuff end end Here's my functional test: class BarsControllerTest << ActionController::TestCase def "test foo" do # run foo foo # assert stuff end end When I run the test I get: NameError: undefined local variable or method `foo' for #<BarsControllerTest:0x102f2eab0> All the documentation on functional tests describe how to simulate a http get request to the bar_controller which then runs the method. But I'd just like to run the method without hitting it with an http get or post request. Is that possible? There must be a reference to the controller object inside the functional test, but I'm still learning ruby and rails so need some help.

    Read the article

  • How to call base abstract or interface from DAL into BLL?

    - by programmerist
    How can i access abstract class in BLL ? i shouldn't see GenAccessor in BLL it must be private class GenAccessor . i should access Save method over _AccessorForSQL. ok? MY BLL cs: public class AccessorForSQL: GenoTip.DAL._AccessorForSQL { public bool Save(string Name, string SurName, string Adress) { ListDictionary ld = new ListDictionary(); ld.Add("@Name", Name); ld.Add("@SurName", SurName); ld.Add("@Adress", Adress); return **base.Save("sp_InsertCustomers", ld, CommandType.StoredProcedure);** } } i can not access base.Save....???????? it is my DAL Layer: namespace GenoTip.DAL { public abstract class _AccessorForSQL { public abstract bool Save(string sp, ListDictionary ld, CommandType cmdType); public abstract bool Update(); public abstract bool Delete(); public abstract DataSet Select(); } private class GenAccessor : _AccessorForSQL { DataSet ds; DataTable dt; public override bool Save(string sp, ListDictionary ld, CommandType cmdType) { SqlConnection con = null; SqlCommand cmd = null; SqlDataReader dr = null; try { con = GetConnection(); cmd = new SqlCommand(sp, con); con.Open(); cmd.CommandType = cmdType; foreach (string ky in ld.Keys) { cmd.Parameters.AddWithValue(ky, ld[ky]); } dr = cmd.ExecuteReader(); ds = new DataSet(); dt = new DataTable(); ds.Tables.Add(dt); ds.Load(dr, LoadOption.OverwriteChanges, dt); } catch (Exception exp) { HttpContext.Current.Trace.Warn("Error in GetCustomerByID()", exp.Message, exp); } finally { if (dr != null) dr.Close(); if (con != null) con.Close(); } return (ds.Tables[0].Rows.Count 0) ? true : false; } public override bool Update() { return true; } public override bool Delete() { return true; } public override DataSet Select() { DataSet dst = new DataSet(); return dst; } private static SqlConnection GetConnection() { string connStr = WebConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; SqlConnection conn = new SqlConnection(connStr); return conn; }

    Read the article

  • Git: Can I commit my working directory to a new branch without commiting it to a current branch?

    - by Noli
    Somewhat new at Git.. I am working on a project, and had all of my tests passing on the master branch. I then made some changes, and when everything started failing, I realized that maybe I should have made those changes in a different branch. Is there I way I can commit the changes to a new branch without commiting them to my master branch, so that the master still has my passing tests?

    Read the article

  • How can I skip the current item and the next in a Python loop?

    - by uberjumper
    This might be a really dumb question, however I've looked around online, etc. And have not seen a solid answer. Is there a simple way to do something like this? lines = open('something.txt', 'r').readlines() for line in lines: if line == '!': # force iteration forward twice line.next().next() <etc> It's easy to do in C++; just increment the iterator an extra time. Is there an easy way to do that in Python? I would just like to point, out the main purpose of this question is not about "reading files and such" and skipping things. I was more looking for C++ iterator style iteration. Also the new title is kinda dumb, and i dont really think it reflects the nature of my question.

    Read the article

  • How do I programmatically determine the current zoom level of a browser window?

    - by Mihai Fonoage
    Hi, I want to find out the zoom level of what is being displayed in a browser window based on the javascripts' window object properties (http://www.javascriptkit.com/jsref/window.shtml) to which I have access. I just can't seem to find the right mathematical formula for the zoom based on the inner width, page offset, etc. I found a solution, but that uses the document.body.getBoundingClientRect call which does not return anything in my case and for which I can't tell if there's a suitable replacement from the window properties. I am using Safari. Thank you, Mihai

    Read the article

  • Getting the start address of the current process's heap?

    - by beta
    Hey, I am exploring the lower level workings of the system, and was wondering how malloc determines the start address of the heap. Is the heap a constant offset or is there a call of some sort to get the start address? Does the stack effect the start address of the heap? Thanks, Braden McDorman

    Read the article

  • How to avoid duplication entry via form into database

    - by DAFFODIL
    <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form", $con); $reb = "select count(*) from customer where name = '$name';" if (mysql_result($reb,0) > 0) { echo "Item Already Added!<br>"; } else { // add the item } mysql_close($con); header( 'Location: http://localhost/cus.php' ); ?> Parse error: parse error in C:\wamp\www\c.php on line 10

    Read the article

  • How to get the current project directory or the bin directory and move a few level up?

    - by melaos
    I have an ASP.Net MVC app, and i have some xsl files inside of the Content directory. I've try a few methods to get directory dynamically buy keep on coming short. So how do i get the directory to point to the Content/xsl folder? the closest that i came to was with this: this.GetType().Assembly.CodeBase which only returns the project DLL, but i can't figure out how to move up a few levels from there or what .net library to use to navigate around the path. there's no ../.. :( Basically i want to navigate to the Content/xsl folder which is at the same level of the Bin directory.

    Read the article

  • Filling combobox from database by using hibernate in Java

    - by denny
    Heyy; I am developing a small swing based application with hibernate in java. And I want fill combobox from database coloumn.How i can do that ? And I don't know in where(under initComponents, buttonActionPerformd) i need to do. For saving i'am using jbutton and it's code is here : private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { int idd=Integer.parseInt(jTextField1.getText()); String name=jTextField2.getText(); String description=jTextField3.getText(); Session session = null; SessionFactory sessionFactory = new Configuration().configure() .buildSessionFactory(); session = sessionFactory.openSession(); Transaction transaction = session.getTransaction(); try { ContactGroup con = new ContactGroup(); con.setId(idd); con.setGroupName(name); con.setGroupDescription(description); transaction.begin(); session.save(con); transaction.commit(); } catch (Exception e) { e.printStackTrace(); } finally{ session.close(); } }

    Read the article

  • Data is not saved in MS Access database

    - by qwerty
    Hello, I have a visual C# project and i'm trying to insert data in a MS Access Database when i press a button. Here is the code: private void button1_Click(object sender, EventArgs e) { try { OleDbDataAdapter adapter=new OleDbDataAdapter(); adapter.InsertCommand = new OleDbCommand(); adapter.InsertCommand.CommandText = "insert into Candidati values ('" + maskedTextBox1.Text.Trim() + "','" + textBox1.Text.Trim() + "', '" + textBox2.Text.Trim() + "', '" + textBox3.Text.Trim() + "','" + Convert.ToDouble(maskedTextBox2.Text) + "','" + Convert.ToDouble(maskedTextBox3.Text) + "')"; con.Open(); adapter.InsertCommand.Connection = con; adapter.InsertCommand.ExecuteNonQuery(); con.Close(); MessageBox.Show("Inregistrare adaugata cu succes!"); maskedTextBox1.Text = null; maskedTextBox2.Text = null; maskedTextBox3.Text = null; textBox1.Text = null; textBox2.Text = null; textBox3.Text = null; maskedTextBox1.Focus(); } catch (AdmitereException exc) { MessageBox.Show("A aparut o exceptie: "+exc.Message, "Eroare!", MessageBoxButtons.OK, MessageBoxIcon.Error); } } The connection string is: private static string connectionString; OleDbConnection con; public AddCandidati() { connectionString = "Provider=Microsoft.JET.OLEDB.4.0;Data Source=Admitere.mdb"; con = new OleDbConnection(connectionString); InitializeComponent(); } Where AddCandidati is the form. The data is not saved in the database, why? I have the .mdb file in the project folder.. What i'm doing wrong? I did not got any exception when i press the button.. Thanks!

    Read the article

  • delayed_job :run_at is not working. all jobs set to run at current time

    - by jtwg
    I have installed the collectiveidea fork for delayed_job at git://github.com/collectiveidea/delayed_job.git but cannot get it to accept :run_at from my gemfile gem 'rails', '3.2.2' gem 'delayed_job_active_record' when I try it in the console 1.9.2-p318 :005 > Time.now => 2012-03-24 10:20:34 -0700 1.9.2-p318 :006 > User.delay.new :run_at => 5.days.from_now SQL (0.1ms) BEGIN SQL (1.6ms) INSERT INTO `delayed_jobs` (`attempts`, `created_at`, `failed_at`, `handler`, `last_error`, `locked_at`, `locked_by`, `priority`, `run_at`, `updated_at`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["attempts", 0], ["created_at", Sat, 24 Mar 2012 17:20:36 UTC +00:00], ["failed_at", nil], ["handler", "--- !ruby/object:Delayed::PerformableMethod\nobject: !ruby/class 'User'\nmethod_name: :new\nargs:\n- :run_at: 2012-03-29 17:20:36.876374000Z\n"], ["last_error", nil], ["locked_at", nil], ["locked_by", nil], ["priority", 0], ["run_at", Sat, 24 Mar 2012 17:20:36 UTC +00:00], ["updated_at", Sat, 24 Mar 2012 17:20:36 UTC +00:00]] (2.7ms) COMMIT => #<Delayed::Backend::ActiveRecord::Job id: 17, priority: 0, attempts: 0, handler: "--- !ruby/object:Delayed::PerformableMethod\nobject:...", last_error: nil, run_at: "2012-03-24 17:20:36", locked_at: nil, failed_at: nil, locked_by: nil, created_at: "2012-03-24 17:20:36", updated_at: "2012-03-24 17:20:36"> I see there is some UTC offset in the runtime, but based on Time.now, I can tell run_at is not going forward by 5 days. "run_at", Sat, 24 Mar 2012 17:20:36 UTC +00:00 Any ideas?

    Read the article

  • How to aviod duplication entry via form into database

    - by DAFFODIL
    <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form", $con); $reb = "select count(*) from customer where name = '$name';" if (mysql_result($reb,0) > 0) { echo "Item Already Added!<br>"; } else { // add the item } mysql_close($con); header( 'Location: http://localhost/cus.php' ); ?> Parse error: parse error in C:\wamp\www\c.php on line 10

    Read the article

  • Rails - how can I capture the URL that directed to the current action in my app?

    - by sa125
    Hi - I need to see what page a request came from in my controller so I could be able to redirect back to it. For example, if I'm on a page showing a specific product (say /products/1) and it has a link to its vendor (/vendors/12), I want to be able to detect inside the vendors_controller that I came to that page from /products/1. Is there a simple way in Rails to achieve this, so that I could access it via params or session? thanks.

    Read the article

  • how escape quotes when inserting into database in PHP

    - by Mauro74
    Hi all, I'm quite new to PHP so sorry if sounds such an easy problem... :) I'm having an error message when inserting content which contains quotes into my db. here's what I tried trying to escape the quotes but didn't work: $con = mysql_connect("localhost","xxxx","xxxxx"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("test", $con); $nowdate = date('d-m-Y') $title = sprintf($_POST[title], mysql_real_escape_string($_POST[title])); $body = sprintf($_POST[body], mysql_real_escape_string($_POST[body])); $sql="INSERT INTO articles (title, body, date) VALUES ('$title','$body','$nowdate'),"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } header('Location: index.php'); Could you provide any solution please? Thanks in advance. Mauro

    Read the article

  • Is their a definitive list for the differences between the current version of SQL Azure and SQL Serv

    - by Aim Kai
    I am a relative newbie when it comes to SQL Azure!! I was wondering if there was a definitive list somewhere regarding what is and is not supported by SQL Azure in regards to SQL Server 2008? I have had a look through google but I've noticed some of the blog posts are missing things which I have found through my own testing: For example, quite a lot is summarised in this blog entry http://www.keepitsimpleandfast.com/2009/12/main-differences-between-sql-azure-and.html Common Language Runtime (CLR) Database file placement Database mirroring Distributed queries Distributed transactions Filegroup management Global temporary tables Spatial data and indexes SQL Server configuration options SQL Server Service Broker System tables Trace Flags which is a repeat of the MSDN page http://msdn.microsoft.com/en-us/library/ff394115.aspx I've noticed from my own testing that the following seem to have issues when migrating from SQL Server 2008 to the Azure: XML Types (the msdn does mention large custom types - I guess it may include this?? even if the data schema is really small?) Multi-part views I've been using SQL Azure Migration Wizard v3.1.8 to migrate local databases into the cloud. I was wondering if anyone could point to a list or give me any information till when these features are likely to be included in SQL Azure.

    Read the article

  • Android: How to make current layout with scrollable text view?

    - by Solata
    I tried multiple solution but none seem to work. Layout: -------------------- |btn1| txt1 |btn2| -------------------- | | | | | | | txtview1 | | | | | | | -------------------- btn1 - top left aligned - decrease txt1 btn2 - top right aligned - increase txt1 txt1 - top center aligned - text/number entered with code textview1 - client aligned with vertical scrollbar, if needed - text entered with code

    Read the article

  • In Coldfusion, how do I init a component that is located above the current path folder?

    - by Dan Sorensen
    If I have a folder structure that looks like this: / /bin/myComponent.cfc /reports/index.cfm How do I initiate myComponent.cfc from index.cfm? myService = createObject("component", "bin.myComponent"); Using the dot syntax, I know how to go to deeper folders, but how to do I go up a folder, and down into the other folder? Using slash syntax it would be something like this: ../bin/myComponent.cfc But createObject() doesn't work that way. I'd like to keep a relative path so that I can move this folder to another server without breaking the paths. Ideas? Thanks!

    Read the article

  • Rails and Prawn PDF - add current item ID to filename?

    - by dannymcc
    Hi Everyone, I have two PDFs that are made "on the fly" using Prawn PDF. The PDFs are called jobsheet.pdf and discharge.pdf - their URL's are: railsroot/kases/IDNO/jobsheet.pdf railsroot/kases/IDNO/discharge.pdf I am trying to work out how to automagically append the filename with the ID number: railsroot/kases/IDNO/jobsheet_IDNO.pdf railsroot/kases/IDNO/discharge_IDNO.pdf To create the PDFs the code is as follows: Kases Controller def jobsheet @kase = Kase.find(params[:id]) respond_to do |format| format.html {} # jobsheet.html.erb format.xml { render :xml => @kase } format.pdf { render :layout => false } prawnto :prawn => { :background => "#{RAILS_ROOT}/public/images/jobsheet.png", :left_margin => 0, :right_margin => 0, :top_margin => 0, :bottom_margin => 0, :page_size => 'A4' } end end # GET /kases/1 # GET /kases/1.xml def discharge @kase = Kase.find(params[:id]) respond_to do |format| format.html { } # discharge.html.erb format.xml { render :xml => @kase } format.pdf { render :layout => false } prawnto :prawn => { :background => "#{RAILS_ROOT}/public/images/discharge.png", :left_margin => 0, :right_margin => 0, :top_margin => 0, :bottom_margin => 0, :page_size => 'A4' } end end Routes map.resources :kases, :member => { :discharge => :get } map.resources :kases, :member => { :jobsheet => :get } To view the PDF's I use the following links: jobsheet_kase_path(@kase, :format => 'pdf') discharge_kase_path(@kase, :format => 'pdf') Is this even possible? Thanks, Danny

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >