develooper Front page | perl.dbi.users | Postings from March 2008

Re: perl DBI on windows 64

Thread Previous | Thread Next
From:
Alexander Foken
Date:
March 18, 2008 03:21
Subject:
Re: perl DBI on windows 64
Not quite an example, but test code, included in the DBD::ODBC 
distribution. See 
<http://search.cpan.org/src/MJEVANS/DBD-ODBC-1.15/t/20SqlServer.t> for 
the current version. The relevant code for the SQL print statement 
starts near line 436.

Alexander

On 18.03.2008 11:13, Ramakrishna Raju wrote:
> Martin,
>
> 	I thought I saw the examples the other day, but I can't seem to
> find them now. Could you give me the link to the examples?
>
> Thanks,
> Ramakrishna Raju ( "Raju" )
> rraju@kcmoptions.com
>
> -----Original Message-----
> From: Martin Evans [mailto:martin.evans@easysoft.com] 
> Sent: Friday, March 14, 2008 4:07 AM
> To: dbi-users@perl.org
> Subject: Re: perl DBI on windows 64
>
> Ramakrishna Raju wrote:
>   
>> Alexander,
>>
>> 	t-SQL has a print command and lot of stored procs have print
>> statements in the code to indicate progress of execution or whatever.
>> I need to capture it and print that to my log. 
>>
>> 	In the error handling department, if there is duplicate key
>> error on a insert or a table is missing, then that error gets printed
>>     
> to
>   
>> the console thru the perl script, but it's getting printed thru some
>> low-level driver and not by the user statement. I need to grab that
>> error situation and send out an email or something. How do I do that? 
>>
>> 	I will do some reading and try to put something together and
>> then we can compare notes.
>>     
>
> Start your reading with the PrintError, RaiseError and HandleError 
> attributes in DBI. Of course, once you've looked at the 20SqlServer 
> example in DBD::ODBC you will see it uses HandleError.
>
> Martin
>   


-- 
Alexander Foken
mailto:alexander@foken.de  http://www.foken.de/alexander/


Thread Previous | Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About