GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SPOPS::DBI::Sybase(3) User Contributed Perl Documentation SPOPS::DBI::Sybase(3)

SPOPS::DBI::Sybase -- Sybase-specific routines for the SPOPS::DBI

 # In your configuration:

 'myspops' => {
     'isa' => [ qw/ SPOPS::DBI::Sybase SPOPS::DBI / ],

     # If you have an IDENTITY field, set increment_field to true...
     'increment_field' => 1,
     # ...and the IDENTITY field in 'no_insert' and 'no_update'
     'no_insert'       => [ 'id' ],
     'no_update'       => [ 'id' ],
     ...
 },

This just implements some Sybase-specific routines so we can abstract them out.

One of them optionally returns the IDENTITY value returned by the last insert. Of course, this only works if you have an IDENTITY field in your table:

 CREATE TABLE my_table (
   id  numeric( 8, 0 ) IDENTITY not null,
   ...
 )

NOTE: You also need to let this module know if you are using this IDENTITY option by setting in your class configuration the key 'increment_field' to a true value.

sql_quote

DBD::Sybase depends on the type of a field if you are quoting values to put into a statement, so we override the default 'sql_quote' from "SPOPS::SQLInterface" to ensure the type of the field is used in the DBI->quote call.

Working with FreeTDS

SPOPS works with FreeTDS/MS SQL Server (presumably with FreeTDS/Sybase as well, but it has not been tested). However, there is one hitch: the combination of DBD::Sybase and FreeTDS does not seem to work properly with the standard DBI field type discovery. As a result, you need to specify your datatypes in your SPOPS configuration using the "dbi_type_info" key:

 my %config = (
       doodad => {
          class          => 'My::Doodad',
          isa            => [ 'SPOPS::DBI::Sybase', 'SPOPS::DBI' ],
          ...,
          dbi_type_info  => { doodad_id => 'int',
                              name      => 'char',
                              action    => 'char' },
       },
 );

See the discussion of "fake types" in SPOPS::DBI::TypeInfo for more information.

Nothing known.

SPOPS::Key::DBI::Identity

DBD::Sybase

DBI

FreeTDS: http://www.freetds.org/

Copyright (c) 2001-2004 intes.net, inc.. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Chris Winters <chris@cwinters.com>

See the SPOPS module for the full author list.

2004-06-02 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.