Re: Safely timing out DBI queries

2006-09-19 Thread Chuck Fox
I realize that this is very specific to the database, however, it may be possible to set a resource limit at the database level that will prevent the queries from consuming too much time. Chuck [EMAIL PROTECTED] wrote: On Sep 18, 2006, at 6:18 PM, Tyler MacDonald wrote: Dean Arnold [EMAIL

Re: DBD::Sybase misleads me?

2006-06-23 Thread Chuck Fox
[EMAIL PROTECTED] wrote: The sp_configure option is dynamic, but only affects future connections. It is an upper limit, and the client has to specifically request the larger packet size to get it. Otherwise the default 512 byte packet size is used. Michael In addition to setting the

Re: Can't connect to Sybase Rep server

2006-03-01 Thread Chuck Fox
One solution would be to install your own error handler and catch the 17001 and 2056 errors and ignore them. HTH, Chuck [EMAIL PROTECTED] wrote: This is not a very helpful answer, but are you sure this is worth trying? A Replication Server is not an Adaptive Server Enterprise. Admittedly

Re: DBD::ODBC, FreeTDS, SQL Server and 'money' column type

2005-07-12 Thread Chuck Fox
Have you tried putting the appropriate money symbol in the front of the string ? Such as $ for US currency. HTH, Chuck [EMAIL PROTECTED] wrote: Hi all. I'm using the process: my $sth = $dbh-prepare ( update xxx set a=?, b=?, c=? where d=? ); $sth-execute( $a, $b, $c, $d ); to update

Re: Connection Issue with DBI::DBD::mysql

2005-06-22 Thread Chuck Fox
Sounds like a windows feature, does user1 have an account on the windows host ? are you using any type of firewall or other security related software ? [EMAIL PROTECTED] wrote: Hi everyone, Trying to connect to a MySQL database from a Linux Server using PERL to a Windows Machine with a

Re: storing hierarchical values in db; methods

2005-06-13 Thread Chuck Fox
I have done this in a production environment. THIS IS NOT TO BE UNDERTAKING BY THE FAINT OF HEART. Caveats: I have used multi parented relationships. In a static environment this is not a big issue. In an environment where constant reparenting occurs, along with the attendant woes of widow

Re: db or file access?

2005-04-11 Thread Chuck Fox
Sample database code supplied with Sybase stores pics :p I'm sure someone somewhere will store them in databases. -- -- Your Friendly Neighborhood DBA, Chuck

Re: install_driver(Sybase) failed: DBD::Sybase initialize:

2005-04-11 Thread Chuck Fox
Anand, It appears that your environment is not correctly setup. Check that you have sourced in the SYBASE.sh located at /opt/sybase11.9.2. It appears that DBD::Sybase attempted to call ct_init in the Sybase libs and failed to find it. Check the SHLIB_PATH. Use isql to connect to verify that

Re: Mixing select and print statements using DBI, DBD::Sybase

2005-02-10 Thread Chuck Fox
Just spoke to my Sybase Tech Support engineer and she assures me that the statements should be coming in the order specified by the SQL. She suggested that the DBD::Sybase implementation may be at the heart of the matter. David Goodman wrote on 2/10/2005, 1:20 PM: No, select ONE=1 is

Re: Nested query problem

2004-12-13 Thread Chuck Fox
Michael A Chase tech wrote on 12/13/2004, 9:24 AM: On 12/13/2004 06:09 AM, Hardy Merrill said: I realize I'm splitting hairs here, and I'm no database expert, but I'm curious about your answer to this - wouldn't this be even slightly more efficient to write the WHERE clause

Re: Does DBD::Sybase support a way to get the number of rows affected by a statement?

2004-12-09 Thread Chuck Fox
But for DBD::Sybase and most others it only tells you after you have fetched/processed the whole result set. Matthew Persico wrote on 12/9/2004, 7:56 PM: Check the DBI docs - I seem to remember a generic function to call for all DBDs which should be implemented to work for particular DBDs

Re: Slow connection to Oracle 9i

2004-10-18 Thread Chuck Fox
Paul, Without knowing much about Oracle (although I can talk your ear off about Sybase), you want to cache connections to the server and set a limit (maybe its 1!) and use this pool of connections to connect to your server. Major advantage: No overhead for creating the connection on

Re: Inserting an Email Address fails.

2004-09-23 Thread Chuck Fox
FROM is a keyword, change the name of the column Hamilton, Kent wrote on 9/23/2004, 3:15 PM: I'm trying to insert an email address into a mysql database and it seems to fail no matter what I do. Here are two different cuts at the code, neither of which works and both return pretty much

Re: UnixODBC

2004-09-07 Thread Chuck Fox
You don't call unixODBC. You setup a data source for unixODBC, then you reference the datasource as if it was a dataserver. I just went through this exercise. The odbc.ini and odbcinst.ini need to have the correct entries for the source of your data. The name that is created in brackets is the

Re: how to format query results

2004-08-19 Thread Chuck Fox
Ravi, Why not try something like testing the var using Posix functions to determine if it is a number and then sprintfing ? Ravi Kongara wrote on 8/19/2004, 6:25 PM: I won't be able to use sprintf( ), b'coz column type is not known. Query includes both numeric and character columns. I

Re: DBD::Sybase message suppression....

2004-07-21 Thread Chuck Fox
Amonotod, Install an error handler (perldoc DBD::Sybase) and ignore messages that come back with a severity of 0 or 10, (print blah has one of these two levels depending on the version of open client.) Your Friendly Neighborhood DBA, Chuck amonotod wrote on 7/21/2004, 5:32 PM: From:

Re: Connection error with DBD-Sybase

2004-06-28 Thread Chuck Fox
Eric, You are using the TLI interface file. You might try using the DNS based one. Chuck Eric Wimer wrote on 6/25/2004, 8:33 PM: We're running Solaris 2.8 with the Sybase ASE v12.5.1 client installed on it. I've confirmed that we can connect to a remote database using isql. Our current

Re: Selecting a record froma table where a column might be null

2004-04-30 Thread Chuck Fox
[EMAIL PROTECTED] wrote: On Thu, 2004-04-29 at 23:20, Chuck Fox wrote: Hmmm, So column != column when the column contains a null. How very unusual. I would have assumed that null = null, but there I go assuming things again. So why does this work ? create table foo( i int, c char(10

Re: Selecting a record froma table where a column might be null

2004-04-30 Thread Chuck Fox
[EMAIL PROTECTED] wrote: On Fri, 2004-04-30 at 15:01, Chuck Fox wrote: [EMAIL PROTECTED] wrote: If you are using Sybase then the default behavior is to allow comparison to NULL. This is NOT ANSI SQL compliant, and one should use where foo is NULL instead of where foo = NULL

Re: Selecting a record froma table where a column might be null

2004-04-29 Thread Chuck Fox
Array BioPharma, Inc. -Original Message- From: Chuck Fox [mailto:[EMAIL PROTECTED] Sent: Thursday, April 29, 2004 3:01 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Selecting a record froma table where a column might be null You can try reformatting your query like this: select

Re: Avoiding coding username/password directly into perl script

2004-03-10 Thread Chuck Fox
[EMAIL PROTECTED] wrote: Hi there, I figured this would be a pretty common problem, but I didn't see anything in the FAQ or docs. We've got a script that uses DBI to connect to SQL Server. There is a system DSN set up and this already has the username and password. So do we really need to pass

Re: DBD

2004-01-14 Thread Chuck Fox
Jeff, I am an associate of Les Peters, the Perl Monk, contact here. We are heavy Sybase users and there may be some possibility of us assisting you in getting *nix flavors. The Windoze and Linux versions of Sybase Open Client are available from www.sybase.com for free to developers, it just

Re: Trying to connect to 2 Sybase database with one 1 script (Intern)

2003-12-11 Thread Chuck Fox
[EMAIL PROTECTED] wrote: Hi! Hello, I am trying to connect to 2 sybase databases (actually it is a nco_sql version3.6). I am trying to connect to the these database with use from a sybase client. When I am just connecting to 1 database, it all works out fine, but when I try to connect to 2

Re: DBD::ODBC - SQL Server - odbc_err_handler - inconsistent results

2003-12-11 Thread Chuck Fox
Louise, [EMAIL PROTECTED] wrote: All, Several days ago, I learned how to use the odbc_err_handler subroutine provided by DBD::ODBC... in order to capture the 'message' spit out for non-DDL/DML commands in a SQL Server, such as 'backup' or 'dbcc'. The first batch of commands tested were a

Re: nmaking dbd-mysql errors

2003-11-10 Thread Chuck Fox
Looks like you are missing the c compiler that your make file is requesting/requiring. Chuck [EMAIL PROTECTED] wrote: Hi: Please see snippet below. Perhaps someone could advise me where to go from here? OS is Win2K Thanks in advance, Howard Begin

Re: Stored procedures and DBD::Sybase

2003-11-10 Thread Chuck Fox
Steven, I believe that you are misunderstanding what it is that you are receiving. The only output from your commands is the print @c. This comes through the error handler since a print statement is a level 0 or level 10 message from the server and not a result set. Try changing the print

Re: ActivePerl And Sybase

2003-11-05 Thread Chuck Fox
to install it in details and thanks - Original Message - From: Chuck Fox [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, November 04, 2003 8:17 PM Subject: Re: ActivePerl And Sybase In addition to the DBD and DBI, you will also need to install Sybase Open Client

Re: ActivePerl And Sybase

2003-11-04 Thread Chuck Fox
In addition to the DBD and DBI, you will also need to install Sybase Open Client or FreeTDS. In terms of installing perl, use the CPAN interface to download and install. Chuck [EMAIL PROTECTED] wrote: I have a WinXP OS and IIS http server. I have download and install ActivePerl 5.8. And I

Re: Escaping single quote in DBI::ODBC

2003-11-04 Thread Chuck Fox
Doubling up the single quotes will effectively escape them [EMAIL PROTECTED] wrote: I am attempting to update a SQLServer db and getting an error when the value contains a quote (apostrophe) as can be seen from the following error message. Error is Update contact information failed, column is

Re: Q: SQL Relay

2003-10-23 Thread Chuck Fox
Henri, I couldn't agree with you more ! Stored procedures are always the way to go. Chuck [EMAIL PROTECTED] wrote: On Thursday, October 23, 2003, at 10:09 AM, Tim Bunce wrote: On Thu, Oct 23, 2003 at 06:50:21PM +1000, Ron Savage wrote: Hi Folks Anyone have experience with this:

Re: prepared insert syntax error on exec

2003-10-15 Thread Chuck Fox
Gary, The names of the columns in the table cannot be replaced with placeholders. If you have to vary the column names, you will need to prepare or preferably do the insert separately for each change of column names. Another option would be to specifiy all the column names in the insert

Re: Problem with DBD::ODBC misinterpreting CHAR columns as VARCHAR so the DBI ChopBlanks attribute 'not working'

2003-10-14 Thread Chuck Fox
Paul, Sounds like the bind did not specifiy the correct property for the column. Its been a long while since I have had to do this, but I beleve that there is a property for the column that will specify what to do with trailing blanks. It sounds like it currently is set to truncate blanks, I

Re: where clause

2003-10-01 Thread Chuck Fox
Maybe my MSSql is a little rusty but isn't the wildcard symbol the % and not the * ? Chuck [EMAIL PROTECTED] wrote: After posting to the newsgroup I thought I should post to the dbi-users mailing list instead. I am unable to get a where clause to work against MS SQL Server. I get no runtime

Re: SQL statement to find and delete double entries

2003-09-22 Thread Chuck Fox
, Chuck Fox Principal DBA America Online, INC [EMAIL PROTECTED] wrote: The only problem with that approach is that it deletes all of the entries and doesn't leave singles behind. I'd probably do it programatically. Grab the results of query 1, store the data in a hash of hashes, then do

Re: get the messages, not the rows

2003-09-22 Thread Chuck Fox
PROTECTED] wrote: On Tue, Sep 16, 2003 at 02:21:54PM -0400, Chuck Fox [EMAIL PROTECTED] wrote: Dave, The command is for the dataserver that you are using. I assumed that the DBCC command was directed at a MS or Sybase Sql Server. Whether you are using DBD:ODBC or DBD:Sybase the effect

Re: SQL statement to find and delete double entries

2003-09-22 Thread Chuck Fox
Avis, The use of a unique clustered index is an interesting solution, however, it requires 1.2 times the space currently consumed by the table and rewrites the table. IMHO, unless we are talking a major duplication i.e. 90% dupes, creating the clustered index will be slower. Chuck [EMAIL

Re: get the messages, not the rows

2003-09-16 Thread Chuck Fox
a transport mechanism for the dbcc command or whatever command you are passing. Chuck [EMAIL PROTECTED] wrote: On Mon, Sep 15, 2003 at 09:23:18AM -0400, Chuck Fox [EMAIL PROTECTED] wrote: David, In regards to the buffering, in Sybase and MS there is a set command SET FLUSHMESSAGE

Re: get the messages, not the rows

2003-09-15 Thread Chuck Fox
David, In regards to the buffering, in Sybase and MS there is a set command SET FLUSHMESSAGE ON, that will force the buffers to flush from OpenClient to the OS. HTH, Chuck Fox [EMAIL PROTECTED] wrote: On Sat, Sep 13, 2003 at 01:08:27PM -0400, Jeff Urlwin [EMAIL PROTECTED] wrote

Re: Problem connecting to non-default db

2003-09-11 Thread Chuck Fox
this problem? I would really appreciate any help. Thanks, Take care, Bilal HTH, Chuck Fox Principal DBA America Online, INC

Re: Problem connecting to non-default db

2003-09-11 Thread Chuck Fox
that. Is there another way to switch the data source to another db? Is there any fix for this DBD::Sybase bug? Thanks, Bilal On Thu, 11 Sep 2003, Chuck Fox wrote: [EMAIL PROTECTED] wrote: Hi, Hello, I'm trying to connect to two ms sqlserver 2000 databases with the same schema

Re: What to do with UTF-8 data?

2003-09-09 Thread Chuck Fox
Steve, I am a Sybase DBA, but in situations like this, I have declared the column on the table to be varbinary or binary and stored the data directly without conversion. Don't know if MySql supports this datatype. HTH, Chuck Fox Principal Database Adminstrator America Online, INC. [EMAIL

Re: deadlock errors w/Perl DBD::Sybase and MS SQL 2000

2003-08-28 Thread Chuck Fox
Ahhh, my favorite error code, the infamous 1205. Obviously the insert statement is not the problem, its the trigger that is being called. Please provide source for the trigger and perhaps I can help. Chuck [EMAIL PROTECTED] wrote: I have a small perl script using DBI and DBD::Sybase as well