If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Perl and the DBI > Sybperl runs with but not with DBI

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-29-05, 18:02
pooja pooja is offline
Registered User
 
Join Date: Dec 2002
Posts: 104
Sybperl runs with but not with DBI

Hello,

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
~Pooja

Last edited by pooja; 09-29-05 at 18:11.
Reply With Quote
  #2 (permalink)  
Old 11-29-05, 00:42
pangup_74 pangup_74 is offline
Registered User
 
Join Date: Feb 2004
Location: UK
Posts: 43
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.....

~Pankaj
Reply With Quote
  #3 (permalink)  
Old 12-05-05, 09:59
pooja pooja is offline
Registered User
 
Join Date: Dec 2002
Posts: 104
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.

--Pooja
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On