RE: DBI access from a CGI script

2001-05-25 Thread Kokarski, Anton
1. make sure that you can connect to the database from the different server using mysql client. Mysql database has a nice feature that allows you to specify which user with which passwd and from where can access particular schema. 2. if #1 passes make sure that you are specifying right ho

RE: DBI access from a CGI script

2001-05-25 Thread Sterin, Ilya
Read 'perldoc DBD::Mysql' for different connect methods. Here is an exert from the docs... $dsn = "DBI:$driver:database=$database;host=$hostname;port=$port"; $dbh = DBI->connect($dsn, $user, $password); Ilya Sterin -Original Message- From: Simon Chan [mailto:[EMAIL PROTECTED]] Sent: Sa

DBI access from a CGI script

2001-05-25 Thread Simon Chan
Hey all, Using a CGI script, I want to access a database from A DIFFERENT server than the mysql database is hosted. What is the proper syntax to access the mysql database on a different server? They're 2 levels of secruity: 1. Log into Telnet shell 2. Log into database This is what I have der

RE: DBD-Oracle 1_06 test error

2001-05-25 Thread Sterin, Ilya
Downgrade to DBI 1.14, since this is a know bug. Ilya Sterin -Original Message- From: Richard M Wesley To: [EMAIL PROTECTED] Sent: 05/25/2001 3:56 AM Subject: DBD-Oracle 1_06 test error -- Forwarded by Richard M Wesley/UK/CSC on 25/05/2001 10:55

DBD-Oracle 1_06 test error

2001-05-25 Thread Richard M Wesley
-- Forwarded by Richard M Wesley/UK/CSC on 25/05/2001 10:55 --- Richard M Wesley/UK/CSC 25/05/2001 10:32 To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED] Subject: DBD-Oracle 1_06 test error Dear All, I am trying to install DBD-Oracle-1_06 onto Sola

Installation Woes, DBD-mysql-2.0900

2001-05-25 Thread Mark Staudinger
Sorry for the lengthy email, but I wanted to include relevant messages. Here's the scoop. The system in question is a FreeBSD 4.1-RELEASE OS, with perl5.00503 and MySQL 3.22.32. I'm attempting to install DBD-mysql-2.0900. I've also just previously installed DBI-1.15 w/o any detectable proble

DBI/DBD::ODBC on Mac OS X

2001-05-25 Thread Justin Kelley
Has anyone built the DBI with DBD::ODBC on Mac OS X yet? If so would you be willing to offer a little help on the compile? I'm doing the ODBC portion right now and it wants the driver directory (I've installed Openlink's drivers for OS X). Any help would be appreciated

DBD-ADO message

2001-05-25 Thread Garrison G. Lutz
Hello all, When using DBD-ADO to connect to MS SQL Server in the "DSN-less" way my program does not reach the end (printing out "Done!"), nor does it die with an error. It simply says: Can't disable AutoCommit at C:/Perl/site/lib/DBI.pm line 433 Any reasons for this? Configuration and pro

RE: Accented Characters.

2001-05-25 Thread Friedman, Robert
Depending on your matching criteria Soundex maybe worth a try. Bob -Original Message- From: webmaster [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 24, 2001 5:31 PM To: [EMAIL PROTECTED] Subject: Accented Characters. Hi, i need your help. Before of all, sorry about my english. Is it p

RE: Accented Characters.

2001-05-25 Thread Rick Wong
I suppose another simple solution is: Select column_name from my_table where column_name = 'jose' or column_name = 'jose' though I think I'd recommend storing a separate column of accent-stripped names in your table if you don't have full control over your search parameter. Somebody correct me

RE: DBI, fork and IPC-Shareable - having problems

2001-05-25 Thread Wilson, Doug
> push(@results,%$hash_ref); I do not think this does what you think it does. It will push an array of values (key1, value1, key2, value2, ...) onto the @results array. And I don't think pushing onto the @results array was the problem, it was just the allRecords array you needed to worry about.

Re: DBI, fork and IPC-Shareable - having problems

2001-05-25 Thread Michael Wray
Actually you'd also need to dereference the array of hashes all the way down to a scalarsince the only way to pass hard data to another process is in a scalar format since everything else uses a memory reference of some sort. On 25 May 2001 12:01:39 CDT, STAFF said: > Indeed, you are passin

Re: DBI, fork and IPC-Shareable - having problems

2001-05-25 Thread STAFF
Indeed, you are passing references ..Shouldn't your dereference when you push onto @results like this: $sth=$dbh->prepare($query); $sth->execute(); while(my $hash_ref=$sth->fetchrow_hashref()){ push(@results,%$hash_ref); } Thus making an array of hashes instead of an array of hash_references?

RE: Accented Characters.

2001-05-25 Thread Steve Sapovits
Actually, with Oracle I've found many times that dropping the LIKE entirely and using Perl's regexp's to filter is much much faster. So I'd second that. Steve Sapovits Global Sports Interactive Work Email: [EMAIL PROTECTED] Home Email: [EMAIL PROTECTED] Work Phone: 610-491-7087 Cell:

Re: Accented Characters.

2001-05-25 Thread Bart Lateur
On Thu, 24 May 2001 18:30:59 -0300, webmaster wrote: >When a search for "josé" only accented strings is brought, but "jose" is not. > >Is there any function available for this situation ? Hey, this is perl! After you've done a search using "... LIKE 'jos_'", you can post-filter using a regex, an

RE: DBI, fork and IPC-Shareable - having problems

2001-05-25 Thread djberge
>Oops, I see you already know you shouldn't 'push()' references >to a Shareable object. Instead of 'push' it should be something >like '$results[$i++] = ... '. Also are you sure you want to >store the results of ALL the queries in the same array? Ok - tried making that change. Also put back "IPC

Re: Accented Characters.

2001-05-25 Thread webmaster
Hi, Michael, thanks for your help. Below is the code i am using: use DBI; my $DSN = 'driver=Microsoft Access Driver (*.mdb);dbq=DB3.mdb'; my $dbh = DBI->connect("dbi:ODBC:$DSN", '', '', {RaiseError =>1}) or die "Couldn't connect!"; $sql = "SELECT * from tudo_ba where figura1 like '%josé%

RE: DBI, fork and IPC-Shareable - having problems

2001-05-25 Thread Wilson, Doug
Just another thought. Shouldn't you lock the Shareable object before adding elements to it? And if you do change the 'push' to '$allRecords[$i++] = ...' then the $i would have to be shared (and locked) also. -Original Message- From: Mr. Sunray [mailto:[EMAIL PROTECTED]] Sent: Friday, Ma

Re: Accented Characters.

2001-05-25 Thread Mark Thornber
(Just an Idea ) You could try soundex encoding - if that works with accented chars. --MarkT webmaster wrote: > > If i use SELECT name FROM table WHERE name LIKE "jos%" > > i'll receive jose, josé, josefa, joselene where i only need josé and jose. > > There is in the MSSQL Server an option: A

RE: Accented Characters.

2001-05-25 Thread gordon . dewis
If you're using Oracle, try something like this: -8<- : : $sth=$dbh->prepare("select * from users where convert(first_name,'US7ASCII')=convert(?,'US7ASCII')"); $sth->execute('josé'); : : -8<- That should select both "josé" and "jose"

Re: Accented Characters.

2001-05-25 Thread Joern Reder
webmaster wrote: > If i use SELECT name FROM table WHERE name LIKE "jos%" > > i'll receive jose, josé, josefa, joselene where i only need josé and jose. Try the _ wildcard instead: SELECT name FROM table WHERE name LIKE "jos_" The _ matches only one character, not a sequence of characters

Re: Accented Characters.

2001-05-25 Thread Michael Peppler
webmaster writes: > If i use SELECT name FROM table WHERE name LIKE "jos%" Use: like "joe[_]" > i'll receive jose, josé, josefa, joselene where i only need josé and jose. > > There is in the MSSQL Server an option: Accent-Insensitive. This is probably your best bet. DBI doesn't handle thi

Re: Accented Characters.

2001-05-25 Thread webmaster
If i use SELECT name FROM table WHERE name LIKE "jos%" i'll receive jose, josé, josefa, joselene where i only need josé and jose. There is in the MSSQL Server an option: Accent-Insensitive. Do you think there is something written that could help me ? Thanks. Vivian. - Original Message -

RE: DBI, fork and IPC-Shareable - having problems

2001-05-25 Thread Wilson, Doug
Oops, I see you already know you shouldn't 'push()' references to a Shareable object. Instead of 'push' it should be something like '$results[$i++] = ... '. Also are you sure you want to store the results of ALL the queries in the same array? -Original Message- From: Mr. Sunray [mailto:[E

RE: DBI, fork and IPC-Shareable - having problems

2001-05-25 Thread Wilson, Doug
I was curious about IPC::Shareable, so I read the README and found this (HTH): 3. Array operations on references Generally, when a reference is assigned to a shared variable, the referenced data is also supposed to be shared. However, this currently is not the case for references as

update - using statement handle in a loop

2001-05-25 Thread Laurie Gennari
In typical Perl fashion (for me, anyway), I have no idea what the problem was, but I got my script to work by using foreach tablespace { get list of datafiles begin backup mode call separate script to do fancy file copying with forks and children end backup mode} rather than putting all the fanc

Re: DBI - for Oracle 8i

2001-05-25 Thread denis
Sorry TIM i forgot to mention error shown in "perl MakeFile.pl" - Warning: By default new modules are installed into your 'site_lib' directories. Since site_lib directories come after the normal library directories you must delete any old DBD::Oracle files and directories fro

DBI, fork and IPC-Shareable - having problems

2001-05-25 Thread Mr. Sunray
Hi all, Perl 5.6 on bughat 6.2, using DBI 1.14, DBD-Oracle 1.06. Ok - I thought I'd try and optimize a series of sql SELECT statements by forking each one and storing the results in a shared memory object. Here's the code - I'm reading a series of sql select statements from a file, fork'ing a

Re: Accented Characters.

2001-05-25 Thread Julio Santiago
A simple solution is: Select column_name from my_table where column_name like 'jose' or you can replace the accented e with the while card " % " ie 'jos%' Cheers Julio Santiago >From: "webmaster" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Subject: Accented Characters. >Date: Thu, 24 May 20

Re: DBI - for Oracle 8i

2001-05-25 Thread Tim Scott
Denis, When you did the 'perl Makefile.PL', did it find Oracle and everything correctly ? Is there any particular reason you're using 'Makefile.aperl', rather than simply 'make' ? Which version of DBI are you using ? Tim - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTE

DBI - for Oracle 8i

2001-05-25 Thread denis
Hi gurus, I have installed Oracle 8i enterprise edition on Linux and also successfully installed DBI module. When i installed DBD::Oracle module, it shows me this error --- You have a wait.ph file generated by perl h2ph utility. It does not define a WCOREDUMP funct