Sponsored Content
Full Discussion: Perl Database access
Top Forums Shell Programming and Scripting Perl Database access Post 302158616 by frank_rizzo on Wednesday 16th of January 2008 12:54:50 AM
Old 01-16-2008
change

Code:
$sth->execute();

to

Code:
$sth->execute($ARGV[0]);

you need to pass in the value for the parameter marker you set.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

microsoft access database on Unix

Hello, I am a newborn baby to Unix and I was told that it was possible to have Microsoft Access databases on a Unix web server. I am using Perl to interface and query the Access database, which puts the information into the appropriate fields of a web page. Then updated information is submitted... (1 Reply)
Discussion started by: spiderling
1 Replies

2. Programming

C program with Oracle database access

Hey, I want to access oracle database through Unix C programming.. Can you through me some light on that... (5 Replies)
Discussion started by: kavi
5 Replies

3. UNIX for Advanced & Expert Users

Help with ms access database and firebird

Hi! I need to access two diferent databases allocated in a linux server through PHP. I know in the php.ini file I can't configure some parameters as odbc.default_db... but I can't configure it. I've already installed unixodbc drivers Can Anybody point me to a tutorial web o teach me how... (0 Replies)
Discussion started by: ncatdesigner
0 Replies

4. Shell Programming and Scripting

Access to database/eval command

Hi i have the following code: if(($line!=1) and (@field!='\$')){ print ( "\nTRY TO CONNECT TO DATABASE................\n"); my $dbh = DBI->connect($dsn, $user, $pass); print ("CONNECTED TO DATABASE\n"); eval ... (1 Reply)
Discussion started by: chriss_58
1 Replies

5. Shell Programming and Scripting

problem trying to access a database

hi guys, I am using the following code in order to access a database. #!/usr/bin/perl print "READ DATA FROM DATABASE\n"; use DBI; use strict; #use DBD::Oracle; my $user='reassure'; my $pass='R3Assur3'; #my $dsn="dbi:Oracle:orcl"; my $dsn='dbi:Oracle:cobscs.world'; my $dbh =... (1 Reply)
Discussion started by: chriss_58
1 Replies

6. Shell Programming and Scripting

Database access

Hell all, I have the following snippet of code: $sql=qq{select * from ( select to_char(t.start_time_timestamp,'yyyy/mm/dd hh24:mi:ss') start_time,t.s_p_number_address, null cos_icsa_code, null cos_icsa_subcode from cc_unrated_msc_flow t union select... (2 Replies)
Discussion started by: chriss_58
2 Replies

7. IP Networking

Access database over internet, help

Hi! :D I'm new here, and I will appreciate all the help you can give. This is the problem we are trying to solve at my office. At office 1 we have SCO UNIX 5.0.can't remember last number. On it runs database software on which we input/read/modify data throughout terminal software, on remote... (1 Reply)
Discussion started by: PNemesis
1 Replies

8. Shell Programming and Scripting

using unix scripts database access

i want to access database (sql script) within a unix script. help me (2 Replies)
Discussion started by: chamaraa
2 Replies

9. UNIX for Dummies Questions & Answers

Access to a database

Hello all, is it possible to write a script in order to connect to a database, load data in a specific domain and execute the corresponding command? (3 Replies)
Discussion started by: FelipeAd
3 Replies

10. AIX

No Suitable Driver for MS Access database

Hi, I am running a JDBC:ODBC code to access .mdb file in my windows system successfully but, not able to access MS Access mdb file in AIX Unix box. when I am trying to run the same piece of code in AIX Unix box it is saying "No Suitable Driver". I need some immediate help. (0 Replies)
Discussion started by: thirunp
0 Replies
HTML::FormHandler::Manual::Database(3pm)		User Contributed Perl Documentation		  HTML::FormHandler::Manual::Database(3pm)

NAME
HTML::FormHandler::Manual::Database - FormHandler use recipes VERSION
version 0.40013 SYNOPSIS
Manual Index Information on interfacing FormHandler forms and fields with a database. Also see HTML::FormHandler::TraitFor::Model::DBIC. Form Models For a database form, use a model base class that interfaces with the database, such as HTML::FormHandler::Model::DBIC, which needs to be installed as a separate package. There's also a sample 'object' model in HTML::FormHandler::Model::Object, which will update a simple object. When using a database model, form field values for the row are retrieved from the database using the field 'accessor' attributes (defaults to field name) as database class accessors. FormHandler will use relationships to populate single and multiple selection lists, and validate input. A 'single' relationship is processed by HTML::FormHandler::Field::Compound. A 'has_many' relationship is processed by HTML::FormHandler::Field::Repeatable. You can pass in either the primary key or a row object to the form. If a primary key (item_id) is passed in, you must also provide the schema. The model will use the item_class (DBIC source name) to fetch the row from the database. If you pass in a row object (item), the schema, item_class, and item_id will be set from the row. Executing "$form->process( item => $row, params => $params );" will validate the parameters and then update or create the database row object. Fields that map to database relationships Select A select field will automatically retrieve a select list from the database, if the proper column names are provided. Single selects handle 'belongs_to' relationships, where the related table is used to construct a selection list from the database. See also HTML::FormHandler::Field::Select and 'lookup_options' in HTML::FormHandler::TraitFor::Model::DBIC. Multiple Select A multiple select is either a 'Select' with multiple => 1 set, or a field of the 'Multiple' type. The name of a Multiple select which pulls options from the database automatically should be the name of the 'many_to_many' relationship. The 'value' of the field is derived from the 'has_many' part of the relationship. The primary key is used for the 'id' of the select. The 'label' column of the select is assumed to be 'name'. If the label column has a different name, it must be specified with 'label_column'. Pertinent attributes: label_column active_column sort_column See also HTML::FormHandler::Field::Select and HTML::FormHandler::Model::DBIC. Compound fields A compound field represents a single relationship to another table. Although most compound relations can be handled without providing a primary key, in some circumstances you may need to provide a PrimaryKey field, or add extra values in update_model. See also HTML::FormHandler::Field::Compound. The default for compound fields is that if all subfields are empty, the value of the compound field is set to undef (null). For some types of relations, you may want to set the 'not_nullable' flag to force the field to contain all subfields anyway, such as when the related rows are not deleted when empty. See test t/compound/empty.t for a demonstration of the difference in output. Repeatable fields The 'Repeatable' field type allows you to update arrays of columns from related tables easily. You will need to provide a 'PrimaryKey' hidden field in the compound field contained in the Repeatable. has_field 'addresses' => ( type => 'Repeatable' ); has_field 'addresses.address_id' => ( type => 'PrimaryKey' ); has_field 'addresses.street'; has_field 'addresses.city'; has_field 'addresses.state'; There are some complications with creating Repeatable elements (with the PrimaryKey field set to undef) in a database and re-presenting the form. See HTML::FormHandler::Field::Repeatable for more info. Flags writeonly Do not read the value from the 'item' when populating the form. noupdate Do not update the database with this field, i.e. do not include it in "$form->value". Form generator A DBIC form generator is installed with the HTML::FormHandler::Model::DBIC package. See HTML::FormHandler::Generator::DBIC. There's also a role, HTML::FormHandler::TraitFor::DBICFields, that allows simple form fields to be auto-generated from a DBIC result class. my $form = HTML::FormHandler::Model::DBIC->new_with_traits( traits => ['HTML::FormHandler::TraitFor::DBICFields'], includes => ['title', 'author' ], field_list => [ 'submit' => { type => 'Submit', value => 'Save', order => 99 } ], item => $book ); AUTHOR
FormHandler Contributors - see HTML::FormHandler COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Gerda Shank. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-25 HTML::FormHandler::Manual::Database(3pm)
All times are GMT -4. The time now is 07:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy