Re: Callbacks registered on class, not instance?

2012-07-11 Thread Jenda Krynicky
Date sent: Mon, 9 Jul 2012 12:36:27 +0200 From: Michael Ludwig mil...@gmx.de To: dbi-users@perl.org Subject:Callbacks registered on class, not instance? There's a huge perl process running, and we don't have access to the source

Re: Common problems calling procedures in MS SQL Server via DBD::ODBC

2010-02-24 Thread Jenda Krynicky
From: Martin J. Evans martin.ev...@easysoft.com I've written up some of the issues causing confusion on dbi-users (and to me personally) with DBD::ODBC and MS SQL Server here: http://www.martin-evans.me.uk/node/58 I encourage all feedback. SET NOCOUNT ON and most of the resultsets with

Re: (Fwd) DBD::Sybase

2009-09-17 Thread Jenda Krynicky
From: greg.sm...@l-3com.com hi Tim, I would greatly appreciate if you could guide or direct me.. I am trying to repair and old Windows 2000 server that uses perl at my company. I am trying to get a perl file to run and i get this error message. I cannot find any DBD Sybase drivers

RE: Problem catching exceptions

2009-08-26 Thread Jenda Krynicky
Date sent: Wed, 26 Aug 2009 09:36:07 -0400 To: Ian Harisay imhar...@nuskin.com, dbi-users@perl.org dbi-users@perl.org From: Kevin Webb k...@cornell.edu Subject:RE: Problem catching exceptions Thank you for your reply Ian.

RE: Problem catching exceptions

2009-08-26 Thread Jenda Krynicky
Thanks for your reply Jenda. There isn't any explicit signal handling code being used. Are you suggesting there is something going on between the driver and the DBI module? No, rather than something probably totally unrelated to DBI assigned something to %SIG{__DIE__}. Maybe in a module

DBD::ODBC, bind_param_inout and MS SQL stored procedure return statuses

2009-05-04 Thread Jenda Krynicky
Assuming I have a stored procedure that contains a return @something statement, what's the right way to find out that value? I know I can get the OUTPUT arguments of a stored procedure by preparing EXEC dbo.SomeProc ?, ?, ? and using bind_param_inout for those that were declared with

Re: DBD::ODBC, bind_param_inout and MS SQL stored procedure return statuses

2009-05-04 Thread Jenda Krynicky
From: Jenda Krynicky je...@krynicky.cz - use strict; use DBI; my $db = DBI-connect(dbi:ODBC:Driver=SQL Server;Server=JobVIPeR;Database=DBIx_Declare_Test); my $sth = $db-prepare('EXEC ? = dbo.FetchUsersAndRetval') or die; my $retval; $sth-bind_param_inout( 1

Re: How to iterate through database tables

2009-02-05 Thread Jenda Krynicky
From: pDale pda...@gmail.com - using a PL/SQL routine as Scott suggests seems to me the best solution, though dynamic SQL might also become a tuning nightmare If he can't build the SELECT in Perl, he shouldn't be allowed to do it in PL/SQL, either, right? Can PL/SQL detect SQL injection

RE: security advice needed

2008-11-14 Thread Jenda Krynicky
From: Ian Harisay [EMAIL PROTECTED] James H. McCullars [mailto:[EMAIL PROTECTED] wrote: So I need to make sure that if I do something like the standard: $sth = $dbh-prepare(INSERT INTO table(foo,bar,baz) VALUES (?,?,?)); and use the contents of the Subject: line as a

Re: Using q() to define a query

2008-01-14 Thread Jenda Krynicky
From: Peter J. Holzer [EMAIL PROTECTED] As an aside, the SPL programming language[2] allows the terminator of a here document to be indented and to strip off everything up to and including some character from each line, so that could be written like this: function foo() { some;

Re: Using q() to define a query

2008-01-14 Thread Jenda Krynicky
From: Peter J. Holzer [EMAIL PROTECTED] On 2008-01-14 13:07:17 +0100, Jenda Krynicky wrote: From: Peter J. Holzer [EMAIL PROTECTED] As an aside, the SPL programming language[2] allows the terminator of a here document to be indented and to strip off everything up to and including some

RE: Using q() to define a query

2008-01-13 Thread Jenda Krynicky
From: Carville, Stephen [EMAIL PROTECTED] I've tried several different ways, global variables, local variables, modules but, FWIW, I've found putting long scripts in a subroutine works pretty well from a maintenance standpoint: (This is from an older report. Now I encourage the poor guy who

Re: DBI-Connect respondign slow

2007-10-30 Thread Jenda Krynicky
On 30 Oct 2007 at 12:48, anurag gupta wrote: Hi All, I have an ASP page with Perl code in it. Now when i open a new session than i am able to connect to the system and get the pages displayed pretty fast. And also whatever database query i fire is executed pretty fast. But if i perform

Re: Cross-Database query engine?

2007-08-01 Thread Jenda Krynicky
On 25 Jul 2007 at 9:43, Daniel Kasak wrote: Greetings. We've been stuck for quite a while between SQL Server and MySQL, and while doing cross-database queries is drop-dead simple in MS Access, it's relatively painful in Perl. Are there any solutions at present for running queries across

Re: dbi access ODBC

2007-08-01 Thread Jenda Krynicky
Hi Martin, you directed me to an article by microsotf to fix an error which is caused when my perl script access a access97 file.The article tell to chk the windows temp folders. that time I got the problem fixed on my XP machine. This time, I am having the same error on a windows server

Re: ODBC probelms when connecting to MSSQL

2007-05-31 Thread Jenda Krynicky
From: Robert Boardman [EMAIL PROTECTED] I'm trying to connect to MSSQL 2000 to execute a number of stored procedures to return values to my IVR system, I have two stored procedures that work, and one that works from the ms query analyser, but when I run the perl script Please send the

Re: MS SQL errors in my script

2007-05-21 Thread Jenda Krynicky
From: Jordan Mueller [EMAIL PROTECTED] Hello, I am trying to write a script that connects to a remote MS SQL database. I have set up dsn on my server before and have no problem connecting. But something is working this time. I am pasting my script and the error messages below. If nay one

Re: looks_like_number function

2006-11-06 Thread Jenda Krynicky
From: Alexander Foken [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Lo all, Which is faster for checking that user input is numeric, using the look_like_number function or a compiled regex? The number in question is a positive 4 digit integer. I think you can beat /^\d{4}$/ only by

RE: [dbi] YA Stored Procedure Question

2005-03-02 Thread Jenda Krynicky
From: Martin J. Evans [EMAIL PROTECTED] I don't use ADO but I do use ODBC. SQL Server normally batches the statements in a procedure so in ODBC terms for your procedure you have to: execute fetchall SQLMoreResults # moves to the update rowcount - to get row update count SQLMoreResults -

Re: Accessing a MS Sqlserver 2000 database via Perl

2005-02-21 Thread Jenda Krynicky
From: Shailesh Patel [EMAIL PROTECTED] I am trying to get hold of Perl modules and code examples which allow me to connect to a MS SqlServer 2000 database, query and manipulate database tables? I know I can use the Win32::ODBC module but I believe this requires a pre-defined ODBC DSN

Re: Affected Rows

2005-01-24 Thread Jenda Krynicky
From: amonotod [EMAIL PROTECTED] From: amonotod [EMAIL PROTECTED] From: Hernan Arredondo [EMAIL PROTECTED] Date: 2005/01/24 Mon PM 12:41:56 CST FROM THE DOCS! snip One alternative method to get a row count for a SELECT is to execute a ``SELECT COUNT(*) FROM ...'' SQL

Re: Fwd: DBD::ODBC and placeholders

2004-12-05 Thread Jenda Krynicky
From: Brian Roy [EMAIL PROTECTED] As a follow-up, I went back to my code where I built this using dbi mysql and did a trace on it. Surprisingly, it sees this as the same thing but it handles it better. Here is the trace output of the mysql version.It sees the last field as a \n character.

Re: DBD::ODBC and placeholders

2004-12-05 Thread Jenda Krynicky
From: Brian Roy [EMAIL PROTECTED] I was under the impression that placeholders would work in ODBC. They do. I was hoping this was the case as I don't want to rewrite my code that works under mySQL. I'm trying to insert into MS SQL server with the same statements. Please let me know if

Re: passing array as subquery to a SQL query (solution implemented)

2004-09-29 Thread Jenda Krynicky
From: Harald Fuchs [EMAIL PROTECTED] In article [EMAIL PROTECTED], Kamran [EMAIL PROTECTED] writes: Hello Jeff, Thanks a lot for your help. It worked, but there is a slight adjustment. Note below: my $QRYstring = select * from $tablename where id IN ( . join (, , @ids) . ) ;

Re: storing query result columns data to multiple arrays

2004-09-29 Thread Jenda Krynicky
From: Kamran [EMAIL PROTECTED] I have a table say students with fields (id int, name char(10) ) . I have data like:- ID NAME == == 1 Kamran 2 Imran 3 Amir 4 Abid I want to store the result of the query directly in mutiple arrays, say @ids

Re: bind_param_inout

2004-09-13 Thread Jenda Krynicky
From: Tim Bunce [EMAIL PROTECTED] On Mon, Sep 13, 2004 at 06:22:13PM +0100, Martin Moss wrote: All, Can I do this? $sth-bind_param_inout($#execute_args+1,\$new_id,38); $sth-execute(@execute_args); When I try I get the following error Can't rebind or change param :p6 in/out

RE: :ODBC, MSSQL, output params

2004-09-07 Thread Jenda Krynicky
From: Jenda Krynicky [EMAIL PROTECTED] From: Jeff Urlwin [EMAIL PROTECTED] It could be a bug. Can you wrap up a quick test case and I'll trace it through? Regards, Jeff Sorry for the delay. #!perl use DBI; my $PROC = '*END*'; ... *END* $db = DBI-connect

Re: multiple prepare calls

2004-08-25 Thread Jenda Krynicky
From: Registry [EMAIL PROTECTED] I hope I am addressing this question to a correct email. I am trying to make multiple prepare statements on one database connection, however I am getting errors. I would just like to know if this is possible. The logic goes something like: my $DBH =

RE: :ODBC, MSSQL, output params

2004-08-20 Thread Jenda Krynicky
From: Jeff Urlwin [EMAIL PROTECTED] It could be a bug. Can you wrap up a quick test case and I'll trace it through? Regards, Jeff Sorry for the delay. #!perl use DBI; my $PROC = '*END*'; CREATE PROCEDURE dbo.GetL__ocationInfo( @LocationID Int, @City varchar(50) OUTPUT,

DBD::ODBC, MSSQL, output params

2004-08-13 Thread Jenda Krynicky
I'm calling some stored procedures using DBI 1.32, DBD::ODBC 1.07 and Perl v5.8.0 (ActivePerl build 805) running on Win2kServer SP4 using MS SQL 2000. Am I supposed to initialize the variables I pass to bind_param_inout()? I'm using code like this to prepare and call the stored procedures

Re: executing MS SQL Server stored procedures

2004-07-16 Thread Jenda Krynicky
From: [EMAIL PROTECTED] (PerlDiscuss - Perl Newsgroups and mailing lists) I am trying to run an MS SQL server stored procedure using Perl. We are using SQL Server 2000. Using the current Perl and DBI. Can I use the ODBC DBD? I am using a prepare,execute and fetch. Has anyone tried this and do

Re: [help] select @@IDENTITY after INSERT

2004-06-01 Thread Jenda Krynicky
From: xtrack [EMAIL PROTECTED] I am trying (as perl newbie) to fetch the returned value of a SELECT @@IDENTITY; the database used is MSSSQL on Win2k Server. The problem is that after the INSERT query i cannot get the returned value correcly Any suggestion is welcome and appreciate. thanks

Re: Accessing large CSV files

2004-04-09 Thread Jenda Krynicky
From: Michael Gerdau [EMAIL PROTECTED] I'm trying to read a large CSV files (some 4 records) with DBD::CSV version 0.2002 and perl v5.8.1 built for i586-linux-thread-multi Reading smaller CSV files (i.e. around 5000 records) works like a charm. Only large ones fail. If all you want to

Re: NULL columns and undef

2004-03-04 Thread Jenda Krynicky
From: [EMAIL PROTECTED] I had an example of how to test if a variable is undef as a result of being NULL in the database but I cannot find it. I looked in perldoc -f undef and only found how to undef a variable with the function. I thought there was a way to test a variable to see if it's

Re: (Fwd) Perl compiler and DBI

2004-02-22 Thread Jenda Krynicky
From: Tim Bunce [EMAIL PROTECTED] - Forwarded message from [EMAIL PROTECTED] - Delivered-To: [EMAIL PROTECTED] Subject: Perl compiler and DBI Date: Fri, 20 Feb 2004 17:55:18 -0500 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] X-SMType: Regular

Re: Hello

2004-01-29 Thread Jenda Krynicky
From: Jeff Zucker [EMAIL PROTECTED] It's called the MyDoom virus. Everyone is getting it. I'm getting over 600 copies of it a day from everywhere. Lucky guy. I get 200-300 hundred an hour. Luckily most of that is now filtered on the server and the rest by PopFile+PMail on the client. The

Re: SQL Server- DBD::ODBC - getting results not rows - question about earlier post

2003-12-09 Thread Jenda Krynicky
From: Mitchell, Louise M [EMAIL PROTECTED] In an earlier post inquiring about how to get the results ( such as from a backup or dbcc ), rather than rows, the response pasted below indicated a solution however, when I try this, I find that the actual results are returning in STDERR, not in

Re: Connecting to a Microsoft SQL Server

2003-12-08 Thread Jenda Krynicky
From: Marcus Willemsen [EMAIL PROTECTED] Has anyone experience with using Perl together with a Microsoft SQL Server 2000? Yes Do I need anything else apart from the DBI-ODBC Module? I guess you meant DBI and DBD::ODBC. You need the ODBC drivers, but I bet you already have them. BEsides you

RE: Intresting case of SQL Injection

2003-12-05 Thread Jenda Krynicky
From: Avis, Ed [EMAIL PROTECTED] I think the moral of the story is that trying to intelligently quote special characters like ' is difficult to get right and too likely to have subtle problems. Better to just forbid the quotation mark: die bad value $foo if $foo =~ tr/'//; $sql =

Re: fwd: Intresting case of SQL Injection

2003-12-04 Thread Jenda Krynicky
From: [EMAIL PROTECTED] (Randal L. Schwartz) The application was developed under PHP 4.2.1, Apache and MSSQL. We started our tests by adding a ' (single quote) to the POST info. Since PHP escapes ' and , turning the ' into a \' but SQL Server uses 2 single quotes ('') to escape a quote

get the messages, not the rows

2003-09-11 Thread Jenda Krynicky
Is there a way to execute an SQL command and get the messages, not the records? I mean, I'd like to run DBCC CHECKDB ('databasename') parse the output and add the result to a daily report of my servers' health. The question is how do I get the messages. I'm using DBI+DBD::ODBC and MS

Re: get the messages, not the rows

2003-09-11 Thread Jenda Krynicky
From: [EMAIL PROTECTED] If MSSQL Server hasn't diverged too far from being a derivative of Sybase, you would trap those messages in an error or a message handler - but that only works in sybperl and DBD::Sybase AFAIK. I don't know how you would get to the those callbacks in ODBC. HTH somewhat.

RE: [dbi] get the messages, not the rows

2003-09-11 Thread Jenda Krynicky
From: Martin J. Evans [EMAIL PROTECTED] I haven't tried it in a long time (other than running make test) but from perldoc DBD::ODBC: odbc_async_exec Allow asynchronous execution of queries. Right now, this causes a spin-loop (with a small sleep) until

Re: How to access data from fields with spaces?

2003-07-07 Thread Jenda Krynicky
From: Anil Menon [EMAIL PROTECTED] Im using a database which supports field names to have spaces(multiple words). The database Im using is fileMaker. Im trying to write a select query thru DBI. For some reason the prepare fails when do a simple sql. I have never worked wih field allows fields

Re: DBD::ODBC, MSSQL, FETCH('NUM_OF_FIELDS') Describe failed on CREATE VIEW

2003-06-23 Thread Jenda Krynicky
From: Brian McCauley [EMAIL PROTECTED] It would appear that NUM_OF_FIELDS fetched after the execute() for a CREATE VIEW statement crashes out. I am able to reproduce this with a simple script running on the Win32 box... use strict; use warnings; use DBI; DBI-trace(11); my $db =

Re: DBI and Forks

2003-04-04 Thread Jenda Krynicky
From: Dean Arnold [EMAIL PROTECTED] I've had the same issue with 631 (and DBD::Teradata), and yes, the connection is created within the child...the issue seems to relate to the way Win32 Perl emulates fork(). I've noticed there's a newer AS build of 5.6.1 available, but alas

Re: fork() issues w/ Win32, Perl 5.6.1, and DBI 1.32

2003-03-05 Thread Jenda Krynicky
From: Dean Arnold [EMAIL PROTECTED] While trying to test some multiprocessing on Win2K (ActiveState 633), I ran into an issue I'm hoping you can shed some light on. If I open a $dbh before forking off some kids that also open some $dbh's, I get the following error in the kids:

RE: DBD::CSV

2003-03-03 Thread Jenda Krynicky
From: Dan Muey [EMAIL PROTECTED] A) But now I discovered few problems: On the same hardware system the same select for the same table 1) Linux the select takes 0.4 seconds 2) Windows the select takes 2.1 seconds Using Apache 1.3.27 and under Windows ActivePerl. Is it a

RE: blob error need help

2003-02-17 Thread Jenda Krynicky
From: Scott Purcell [EMAIL PROTECTED] I do not know how to rebuild DBD::Oracle against Oracle 8i libraries on my 2000 box. I do not think it is possible. I used ppm3 and did a search on the dbd-oracle. The problem is two come up DBD-Oracle [1.12] and DBD-Oracle [1.06] The problem is when

RE: blob error need help

2003-02-17 Thread Jenda Krynicky
From: Scott Purcell [EMAIL PROTECTED] Good. That worked. I do have 1.12 installed now and I verified via the ppm version check. But when I run my original problem, it looks like nothing has changed. (I did get a new window before running this). C:\dbi_play\dbiperl getblob