Search Results

Search found 10028 results on 402 pages for 'berkeley db'.

Page 17/402 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • How to delete data in DB efficiently using LinQ to NHibernate (one-shot-delete)

    - by kastanf
    Hello, producing software for customers, mostly using MS SQL but some Oracle, a decision was made to plunge into Nhibernate (and C#). The task is to delete efficiently e.g. 10 000 rows from 100 000 and still stay sticked to ORM. I've tried named queries - link already, IQuery sql = s.GetNamedQuery("native-delete-car").SetString(0, "Kirsten"); sql.ExecuteUpdate(); but the best I have ever found seems to be: using (ITransaction tx = _session.BeginTransaction()) { try { string cmd = "delete from Customer where Id < GetSomeId()"; var count = _session.CreateSQLQuery(cmd).ExecuteUpdate(); ... Since it may not get into dB to get all complete rows before deleting them. My questions are: If there is a better way for this kind of delete. If there is a possibility to get the Where condition for Delete like this: Having a select statement (using LinQ to NHibernate) = which will generate appropriate SQL for DB = we get that Where condition and use it for Delete. Thanks :-)

    Read the article

  • Building an application that includes a DB, and need recommendations

    - by Rubys
    I'm going to build a little system for personal use, and I want it to save data to a database. The language is going to be C#, and so I'd like to use this opportunity to get my head around LINQ to SQL. I have some DB experience and I know my SQL, but it was all in school using Access, which is giving me trouble, and so I'd like to use another DB, something that is small in size, easy to install, and should work with LINQ to SQL. The problem is: I don't know any except Access, and am looking for recommendations. To sum it up: I need a lightweight, easy to install, linq-to-sql supporting database for a small system on a home computer, any recommendations?

    Read the article

  • A good approach to db planing for reporting service

    - by Itay Moav
    The scenario: Big system (~200 tables). 60,000 users. Complex reports that will require me to do multiple queries for each report and even those will be complex queries with inner queries all over the place + some processing in PHP. I have seen an approach, which I am not sure about: Having one centralized, de-normalized, table that registers any activity in the system which is reportable. This table will hold mostly foreign keys, so she should be fairly compact and fast. So, for example (My system is a virtual learning management system), A user enrolls to course, the table stores the user id, date, course id, organization id, activity type (enrollment). Of course I also store this data in a normalized DB, which the actual application uses. Pros I see: easy, maintainable queries and code to process data and fast retrieval. Cons: there is a danger of the de-normalized table to be out of sync with the real DB. Is this approach worth considering, or (preferably from experience) is total $#%#%t?

    Read the article

  • Loading a DB table into nested dictionaries in Python

    - by Hossein
    Hi, I have a table in MySql DB which I want to load it to a dictionary in python. the table columns is as follows: id,url,tag,tagCount tagCount is the number of times that a tag has been repeated for a certain url. So in that case I need a nested dictionary, in other words a dictionary of dictionary, to load this table. Because each url have several tags for which there are different tagCounts.the code that I used is this:( the whole table is about 22,000 records ) cursor.execute( ''' SELECT url,tag,tagCount FROM wtp ''') urlTagCount = cursor.fetchall() d = defaultdict(defaultdict) for url,tag,tagCount in urlTagCount: d[url][tag]=tagCount print d first of all I want to know if this is correct.. and if it is why it takes so much time? Is there any faster solutions? I am loading this table into memory to have fast access to get rid of the hassle of slow database operations, but with this slow speed it has become a bottleneck itself, it is even much slower than DB access. and anyone help? thanks

    Read the article

  • Looking for some Feedback on a DB Design

    - by zSysop
    I'm currently working on a ticketing system which allows our users to submit tickets based on their own needs. i.e. if Department "A" is submitting a ticket they can have certain types of problem categories (such as "Supplies" or "Printer") along with details pertaining to the chosen category. I have laid out a partial db design and i was looking for some feedback on it. I've never built a system from the ground up by myself so i'm a little bit nervous. here's my a draft version of my db design Issues Table Id | CreatedBy | CreateDate | Status | Owner | AssignedTo | AssignmentDate | ----------------------------------------------------------------------------- EquipmentIssueDetails Table Id | IssueId | Serial # | Make | Model | .... --------------------------------------------- SupplyIssueDetails Table Id | IssueId | SupplyId | ItemId | QTY | UnitOfMeasurement ------------------------------------------------------------- NetworkIssueDetails Table Id | IssueId | Supervisor | Details | ------------------------------------------------------------- Notes Table Id | IssueId | Note | CreatedBy | CreateDate ------------------------------------------------------------- Thanks in advance

    Read the article

  • Pros and cons of sorting data in DB?

    - by Roman
    Let's assume I have a table with field of type VARCHAR. And I need to get data from that table sorted alphabetically by that field. What is the best way (for performance): add sort by field to the SQL-query or sort the data when it's already fetched? I'm using Java (with Hibernate), but I can't tell anything about DB engine. It could be any popular relational database (like MySQL or MS Sql Server or Oracle or HSQL DB or any other). The amount of records in table can vary greatly but let's assume there are 5k records.

    Read the article

  • thumbs.db messing up my upload routine

    - by Scott B
    I'm getting the following error while uploading a zip archive. Warning: ZipArchive::extractTo(C:\xampplite\htdocs\testsite/wp-content/themes/mytheme//styles\mytheme/Thumbs.db) [ziparchive.extractto]: failed to open stream: Permission denied in C:\xampplite\htdocs\testsite\wp-content\themes\mythem\uploader.php on line 17 The thing I can't quite figure is that I don't see a thumbs.db file in either the zip archive or the destination folder that was created (the upload still processes, I just get these errors). The function is below, line 17 is commented... function openZip($file_to_open) { global $target; $zip = new ZipArchive(); $x = $zip->open($file_to_open); if($x === true) { $zip->extractTo($target); //this is line 17 $zip->close(); unlink($file_to_open); } else { die("There was a problem. Please try again!"); } }

    Read the article

  • Hibernate/JPA DB Schema Generation Best Practices

    - by Bytecode Ninja
    I just wanted to hear the opinion of Hibernate experts about DB schema generation best practices for Hibernate/JPA based projects. Especially: What strategy to use when the project has just started? Is it recommended to let Hibernate automatically generate the schema in this phase or is it better to create the database tables manually from earliest phases of the project? Pretending that throughout the project the schema was being generated using Hibernate, is it better to disable automatic schema generation and manually create the database schema just before the system is released into production? And after the system has been released into production, what is the best practice for maintaining the entity classes and the DB schema (e.g. adding/renaming/updating columns, renaming tables, etc.)? Thanks in advance.

    Read the article

  • SQLCe local db in temp- path in connectionstring?

    - by Petr
    Hi, I have SQL Ce db in my app, which is included in my app directory. While debugging its OK, but when published and run with setup.exe, it retrieves "file not found" in temporary directory the app is ran from. I would like to run from standard location, but I dont know how to change it. I am using this string: SqlCeConnection connection = new SqlCeConnection("Data Source=database.sdf;Persist Security Info=False;"); When I run setup.exe, the app never starts, stating that in its temporary directory the db file was not found. When I run app.exe, it works. I do not understand it...:( EDIT: I can see that in the VS project settings, there is connection string and there is "Data Source=|DataDirectory|\Database.sdf" The path should be something like local directory? Thanks!

    Read the article

  • Rails - Posting a Boolean (true or False) and updating the DB in the controller

    - by AnApprentice
    Hello, in my Rails 3 App, I'm posting with jQuery the following: http://0.0.0.0:3000/topics/read_updater?&topic_id=101&read=true In my controller: def read_updater current_user.topics.where(:topic_id => params[:topic_id]).update_all(:read => params[:read]) render :json => {:status => 'success' } end params[:conversation_id] works great, but params[:read] is inserting empty values in the DB, even though jQuery is posting either a true or false. Ideas? I want rails to update the DB with either true or false. Thanks

    Read the article

  • Export DB Tables via phpMyAdmin In Non-Alphabetical Order

    - by dosboy
    I have a MySQL database from a Joomla MultiSite installation where it has a set of tables with different prefixes for each Joomla site. When I export the db via phpMyAdmin it creates a SQL file where the tables are created and populated in alphabetical order. The problem is that the tables for the slave sites have dependencies on the tables for the master site, but alphabetically their prefixes are ahead of the master site. So the export works fine but when I try importing I get error after error and have to manually move sections around in the SQL file to make sure that the dependent tables are created/populated first. So, is it possible to export a db via phpMyAdmin with the tables in a specific order?

    Read the article

  • Creating seed model from data already in DB

    - by Nick Brown
    Is there a way to convert data in an existing database into objects that can easily be put into a seed method? Essentially I'd like to let some people add lines to my DB via a form and then convert that into an object that I can re-seed the DB anytime I need to make changes. The database itself is created via code-first using the following model: public class Combo { public int Id { get; set; } public string MainPrefix { get; set; } public string MainDescriptor { get; set; } public string MainDish { get; set; } public string Connector { get; set; } public string SecondaryDescriptor { get; set; } public string SecondaryDish { get; set; } }

    Read the article

  • retrieve value from db in php

    - by wangdoo
    I have a db in which 1 column value will be always null.I want it to pass to next page but it is passing all values of other column except this null value column. This is my code $row=mysql_query("SELECT * FROM `thirdpartycategorymaster` WHERE ISNULL(`delete`)"); while($row1=mysql_fetch_array($row)) { <td><b><a href="catdel.php?head1=<?php echo $row1['ThirdPartyCategoryName'] . '&&msg1=' . $row1['ThirdPartyCategoryID'] . '&&ctdel=' . $row1['delete']; ?> ">Delete</a></b></td> This my db table ThirdPartyCategoryID ThirdPartyCategoryName delete 29 ecommerce NULL

    Read the article

  • Array "tree" creation from db table

    - by Tural Teyyuboglu
    Trying to create array tree for db driven navigation. Getting following errur: array_key_exists() expects exactly 2 parameters, 1 given on line if (!array_key_exists($tree[$parent]['children'][$id])) Function looks like that $tree = array(); $sql = "SELECT id, parent, name FROM menu WHERE parent ... etc.... "; $results = mysql_query($sql) or die(mysql_error()); while(list($id, $parent, $name) = mysql_fetch_assoc($results)) { $tree[$id] = array('name' => $name, 'children' => array(), 'parent' => $parent); if (!array_key_exists($tree[$parent]['children'][$id])) { $tree[$parent]['children'][$id] = $id; } } Db structure How can I fix that? Whats wrong in this function?

    Read the article

  • How to transfer SQLite db to web server on android phone (android)

    - by Aditya Mehta
    Hello, I have "BackUpContacts.db" database in SQLiteDatabase, it has a table named "ContactInfo" with column names ContactId, ContactName, MobilePhone1, MobilePhone2, OfficePhone1, OfficePhone2, OfficePhone3, HomePhone1, HomePhone2 and TokenId. What i want is to transfer all data of "ContactInfo" table to the mysql database system at some server (means server has also a table similar to "ContactInfo", where all data of "ContactInfo" will be copied). The last important thing which i want is that, whenever i want to get contacts(of a specified TokenId) i can backup all those from server to the mobile device in an xml file. in short, can here anyone help me how to transfer sqlite db to a web server?

    Read the article

  • Creating objects and referencing before saving object to db

    - by Flexo
    Sorry about the vague title, but i didnt know how to ask the question in one line :) I have an order with nested itemgroups that again have nested items. the user specify the amount of item that he would like to have in each itemgroup. I would like to create these items in the create method of the orders controller when the order itself is being created. I kinda have 2 problems here. First, how do i set the reference of the items, or better yet, put the items into the @order object so they are saved when the @order is saved? the items are being stored in the db as the code is now, but the reference is not set because the order is not stored in the db yet so it doesnt have an id yet. Second, im not sure im using the correct way to get the id from my itemgroup. @order = Order.new(params[:order]) @order.itemgroups.each do |f| f.amount.times do @item = Item.new() @item.itemgroup_id = f.id @item.save end end

    Read the article

  • exactly what does rake db:migrate do?

    - by happythenewsad
    Does rake db:migrate only add new migrations, or does it drop all migrations/changes and build everything new? I think rake is throwing an error because it is trying to access a table attribute in migration 040 that was deleted in migration 042. somehow my DB and rake are out of synch and I want to fix them. for you experts out there - is it common for rake to get out of synch with migrations? how can I avoid this (no, I do not hand-edit my schema or rake files).

    Read the article

  • Extending appengine's db.Property with caching

    - by Noio
    I'm looking to implement a property class for appengine, very similar to the existing db.ReferenceProperty. I am implementing my own version because I want some other default return values. My question is, how do I make the property remember its returned value, so that the datastore query is only performed the first time the property is fetched? What I had is below, and it does not work. I read that the Property classes do not belong to the instances, but to the model definition, so I guess that the return value is not cached for each instance, but overwritten on the model every time. Where should I store this _resolved variable? class PageProperty(db.Property): data_type = Page def get_value_for_datastore(self, model_instance): page = super(PageProperty, self).get_value_for_datastore(model_instance) self._resolved = page return page.key().name() def make_value_from_datastore(self, value): if not hasattr(self, '_resolved'): self._resolved = Page.get_by_name(value) return self._resolved

    Read the article

  • Which NoSQL db to use with C?

    - by systemsfault
    Hello all, I'm working on an application that I'm going to write with C and i am considering to use a nosql db for storing timeseries data with at most 8 or 9 fields. But in every 5 minutes there will huge write operations such as 2-10 million rows and then there will be reads(but performance is not as crucial in read as in the write operation). I'm considering to use a NoSQL db here in order to store the data but couldn't decide on which one to use. Couchdb seems to have a stable driver called pillowtalk for C; but Mongo's driver doesn't look as promising as pillowtalk. I'm also open to other suggestions. What is your recommendation?

    Read the article

  • Database Tutorial: The method open() is undefined for the type MainActivity.DBAdapter

    - by user2203633
    I am trying to do this database tutorial on SQLite Eclipse: https://www.youtube.com/watch?v=j-IV87qQ00M But I get a few errors at the end.. at db.ppen(); i get error: The method open() is undefined for the type MainActivity.DBAdapter and similar for insert record and close. MainActivity: package com.example.studentdatabase; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import android.app.Activity; import android.app.ListActivity; import android.content.Intent; import android.database.Cursor; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.Button; import android.widget.Toast; public class MainActivity extends Activity { /** Called when the activity is first created. */ //DBAdapter db = new DBAdapter(this); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button addBtn = (Button)findViewById(R.id.add); addBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent i = new Intent(MainActivity.this, addassignment.class); startActivity(i); } }); try { String destPath = "/data/data/" + getPackageName() + "/databases/AssignmentDB"; File f = new File(destPath); if (!f.exists()) { CopyDB( getBaseContext().getAssets().open("mydb"), new FileOutputStream(destPath)); } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } DBAdapter db = new DBAdapter(); //---add an assignment--- db.open(); long id = db.insertRecord("Hello World", "2/18/2012", "DPR 224", "First Android Project"); id = db.insertRecord("Workbook Exercises", "3/1/2012", "MAT 100", "Do odd numbers"); db.close(); //---get all Records--- /* db.open(); Cursor c = db.getAllRecords(); if (c.moveToFirst()) { do { DisplayRecord(c); } while (c.moveToNext()); } db.close(); */ /* //---get a Record--- db.open(); Cursor c = db.getRecord(2); if (c.moveToFirst()) DisplayRecord(c); else Toast.makeText(this, "No Assignments found", Toast.LENGTH_LONG).show(); db.close(); */ //---update Record--- /* db.open(); if (db.updateRecord(1, "Hello Android", "2/19/2012", "DPR 224", "First Android Project")) Toast.makeText(this, "Update successful.", Toast.LENGTH_LONG).show(); else Toast.makeText(this, "Update failed.", Toast.LENGTH_LONG).show(); db.close(); */ /* //---delete a Record--- db.open(); if (db.deleteRecord(1)) Toast.makeText(this, "Delete successful.", Toast.LENGTH_LONG).show(); else Toast.makeText(this, "Delete failed.", Toast.LENGTH_LONG).show(); db.close(); */ } private class DBAdapter extends BaseAdapter { private LayoutInflater mInflater; //private ArrayList<> @Override public int getCount() { return 0; } @Override public Object getItem(int arg0) { return null; } @Override public long getItemId(int arg0) { return 0; } @Override public View getView(int arg0, View arg1, ViewGroup arg2) { return null; } } public void CopyDB(InputStream inputStream, OutputStream outputStream) throws IOException { //---copy 1K bytes at a time--- byte[] buffer = new byte[1024]; int length; while ((length = inputStream.read(buffer)) > 0) { outputStream.write(buffer, 0, length); } inputStream.close(); outputStream.close(); } public void DisplayRecord(Cursor c) { Toast.makeText(this, "id: " + c.getString(0) + "\n" + "Title: " + c.getString(1) + "\n" + "Due Date: " + c.getString(2), Toast.LENGTH_SHORT).show(); } public void addAssignment(View view) { Intent i = new Intent("com.pinchtapzoom.addassignment"); startActivity(i); Log.d("TAG", "Clicked"); } } DBAdapter code: package com.example.studentdatabase; public class DBAdapter { public static final String KEY_ROWID = "id"; public static final String KEY_TITLE = "title"; public static final String KEY_DUEDATE = "duedate"; public static final String KEY_COURSE = "course"; public static final String KEY_NOTES = "notes"; private static final String TAG = "DBAdapter"; private static final String DATABASE_NAME = "AssignmentsDB"; private static final String DATABASE_TABLE = "assignments"; private static final int DATABASE_VERSION = 2; private static final String DATABASE_CREATE = "create table if not exists assignments (id integer primary key autoincrement, " + "title VARCHAR not null, duedate date, course VARCHAR, notes VARCHAR );"; private final Context context; private DatabaseHelper DBHelper; private SQLiteDatabase db; public DBAdapter(Context ctx) { this.context = ctx; DBHelper = new DatabaseHelper(context); } private static class DatabaseHelper extends SQLiteOpenHelper { DatabaseHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { try { db.execSQL(DATABASE_CREATE); } catch (SQLException e) { e.printStackTrace(); } } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { Log.w(TAG, "Upgrading database from version " + oldVersion + " to " + newVersion + ", which will destroy all old data"); db.execSQL("DROP TABLE IF EXISTS contacts"); onCreate(db); } } //---opens the database--- public DBAdapter open() throws SQLException { db = DBHelper.getWritableDatabase(); return this; } //---closes the database--- public void close() { DBHelper.close(); } //---insert a record into the database--- public long insertRecord(String title, String duedate, String course, String notes) { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_TITLE, title); initialValues.put(KEY_DUEDATE, duedate); initialValues.put(KEY_COURSE, course); initialValues.put(KEY_NOTES, notes); return db.insert(DATABASE_TABLE, null, initialValues); } //---deletes a particular record--- public boolean deleteContact(long rowId) { return db.delete(DATABASE_TABLE, KEY_ROWID + "=" + rowId, null) > 0; } //---retrieves all the records--- public Cursor getAllRecords() { return db.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE, KEY_DUEDATE, KEY_COURSE, KEY_NOTES}, null, null, null, null, null); } //---retrieves a particular record--- public Cursor getRecord(long rowId) throws SQLException { Cursor mCursor = db.query(true, DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE, KEY_DUEDATE, KEY_COURSE, KEY_NOTES}, KEY_ROWID + "=" + rowId, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } //---updates a record--- public boolean updateRecord(long rowId, String title, String duedate, String course, String notes) { ContentValues args = new ContentValues(); args.put(KEY_TITLE, title); args.put(KEY_DUEDATE, duedate); args.put(KEY_COURSE, course); args.put(KEY_NOTES, notes); return db.update(DATABASE_TABLE, args, KEY_ROWID + "=" + rowId, null) > 0; } } addassignment code: package com.example.studentdatabase; public class addassignment extends Activity { DBAdapter db = new DBAdapter(this); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.add); } public void addAssignment(View v) { Log.d("test", "adding"); //get data from form EditText nameTxt = (EditText)findViewById(R.id.editTitle); EditText dateTxt = (EditText)findViewById(R.id.editDuedate); EditText courseTxt = (EditText)findViewById(R.id.editCourse); EditText notesTxt = (EditText)findViewById(R.id.editNotes); db.open(); long id = db.insertRecord(nameTxt.getText().toString(), dateTxt.getText().toString(), courseTxt.getText().toString(), notesTxt.getText().toString()); db.close(); nameTxt.setText(""); dateTxt.setText(""); courseTxt.setText(""); notesTxt.setText(""); Toast.makeText(addassignment.this,"Assignment Added", Toast.LENGTH_LONG).show(); } public void viewAssignments(View v) { Intent i = new Intent(this, MainActivity.class); startActivity(i); } } What is wrong here? Thanks in advance.

    Read the article

  • How to insert the recently inserteddata of a table to others DB's Table? See description...

    - by Parth
    I am using MySQL DB and I have created a PHP script for the following, now i need the idea for the below asked question.... please help... I have a table called audit trail whose structure is: id, trackid, table, operation, newvalue, oldvalue, field, changedone I have created triggers for insert/update/delete for every table of same DB, now whenever there is change in ny DB the triggers get activated and updates the Audit trail table accordingly.. I am tracking these changes so that i can use these changes to be done on production DB which is of same structure as of this test DB. Also when the admin finds that he does not need the changes recently he did for production DB then he can rollback it using the Old Data it stored in Ausittrail table of test db. Now here in audit trail table structure, there will be an insert for every single field change like-wise if a table has 4 fields then the change in that tavle will insert 4 rows in audit trail.. Coming to the question now, How can i find the latest change done from the Audit table so that I can insert these changes in Production DB.

    Read the article

  • Apache2 cgi's crash on odbc db access (but run fine from shell)

    - by Martin
    Problem overview (details below): I'm having an apache2 + ruby integration problem when trying to connect to an ODBC data source. The main problem boils down to the fact that scripts that run fine from an interactive shell crash ruby on the database connect line when run as a cgi from apache2. Ruby cgi's that don't try to access the ODBC datasource work fine. And (again) ruby scripts that connect to a database with ODBC do fine when executed from the command line (or cron). This behavior is identical when I use perl instead of ruby. So, the issue seems to be with the environment provided for ruby (perl) by apache2, but I can't figure out what is wrong or what to do about it. Does anyone have any suggestions on how to get these cgi scripts to work properly? I've tried many different things to get this to work, and I'm happy to provide more detail of any aspect if that will help. Details: Mac OS X Server 10.5.8 Xserve 2 x 2.66 Dual-Core Intel Xeon (12 GB) Apache 2.2.13 ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0] ruby-odbc 0.9997 dbd-odbc (0.2.5) dbi (0.4.3) mod_ruby 1.3.0 Perl -- 5.8.8 DBI -- 1.609 DBD::ODBC -- 1.23 odbc driver: DataDirect SequeLink v5.5 (/Library/ODBC/SequeLink.bundle/Contents/MacOS/ivslk20.dylib) odbc datasource: FileMaker Server 10 (v10.0.2.206) ) a minimal version of a script (anonymized) that will crash in apache but run successfully from a shell: #!/usr/bin/ruby require 'cgi' require 'odbc' cgi = CGI.new("html3") aConnection = ODBC::connect('DBFile', "username", 'password') aQuery = aConnection.prepare("SELECT zzz_kP_ID FROM DBTable WHERE zzz_kP_ID = 81044") aQuery.execute aRecord = aQuery.fetch_hash.inspect aQuery.drop aConnection.disconnect # aRecord = '{"zzz_kP_ID"=>81044.0}' cgi.out{ cgi.html{ cgi.body{ "<pre>Primary Key: #{aRecord}</pre>" } } } Example of running this from a shell: gamma% ./minimal.rb (offline mode: enter name=value pairs on standard input) Content-Type: text/html Content-Length: 134 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML><BODY><pre>Primary Key: {"zzz_kP_ID"=>81044.0}</pre></font></BODY></HTML>% gamma% ) typical crash log lines: Dec 22 14:02:38 gamma ReportCrash[79237]: Formulating crash report for process perl[79236] Dec 22 14:02:38 gamma ReportCrash[79237]: Saved crashreport to /Library/Logs/CrashReporter/perl_2009-12-22-140237_HTCF.crash using uid: 0 gid: 0, euid: 0 egid: 0 Dec 22 14:03:13 gamma ReportCrash[79256]: Formulating crash report for process perl[79253] Dec 22 14:03:13 gamma ReportCrash[79256]: Saved crashreport to /Library/Logs/CrashReporter/perl_2009-12-22-140311_HTCF.crash using uid: 0 gid: 0, euid: 0 egid: 0

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >