Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2002

    Unanswered: Sybperl runs with but not with DBI


    I have a problem. I migrated sybperl to DBI perl. It calls a proc which either inserts ot updates a table . this table contains a column (not null) and default attached to it.

    Here comes the strange part. when this proc is called from Sybperl a record get inserted successfully.
    But when same proc is called from DBI , insert failed for the column which has default attached to it.
    (default is to insert hostname)
    column is not used in proc(no insert no update) which means default will be applicable on it.

    This is kind of urgent
    Sybase version 12.5 , DBI version 1.13, Perl 5
    any help on this would be appreciated,
    thanx alot in advance
    Last edited by pooja; 09-29-05 at 19:11.

  2. #2
    Join Date
    Feb 2004
    Hi pooja
    It might possible that at the time of insertion into the database from proc u r not giving the order of the field..Like this

    insert into <tablename> (<field1>,<filed2>,<field3>) values (<value1>,<value2>,<value3>)

    Try this...Hope ur SP will work with DBI also.....


  3. #3
    Join Date
    Dec 2002
    Hello Pankaj,

    Thanx for your answer. My findings were lil different here , as i mentioned default was attached to the not null column ( which use to pass hostname value). so by default hostname is not passed in DBI connect string (by default passes NULL), for which we need to explicitly pass hostname value while connecting , which eventually solved the problem.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts