Generic way of fetching a list of databases

2018-11-15 Thread Daniel Kasak
Hi all. I have a project that has to support pretty much every major database around, plus a number of more esoteric "big data" platforms as well. Until now, I've had a bunch of methods, implementing fetching databases, schemas, tables, etc, per database, with database-specific queries ( eg agains

Re: DBD::ODBC and issues getting LongTruncOk / LongReadLen to take effect

2018-11-15 Thread Daniel Kasak
f failed: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) (SQL-HY000) at db2_syscat_columns.pl line 38. Dan > > On 16/11/18 10:54, Daniel Kasak wrote: > > Hi Martin. Sorry for the very long delay. We had abandoned the ODBC > > dr

Re: DBD::ODBC and issues getting LongTruncOk / LongReadLen to take effect

2018-11-15 Thread Daniel Kasak
en too small) (SQL-HY000) at db2_syscat_columns.pl line 36. Thanks for your time ... Dan On Thu, Apr 5, 2018 at 9:50 PM Martin J. Evans via dbi-users < dbi-users@perl.org> wrote: > On 05/04/18 12:24, Daniel Kasak wrote: > > Hi all. > > > > I'm writing a database uti

DBD::ODBC and issues getting LongTruncOk / LongReadLen to take effect

2018-04-05 Thread Daniel Kasak
Hi all. I'm writing a database utility that has to access IBM's "DashDB" and other DB2-variants. I have their latest ODBC driver, and I have simple queries working. However queries against their system catalog are not working - queries appear to be returning *empty* recordsets. After some laboriou

Re: ANNOUNCE: Camelbox, a build of Perl for Windows that includes GTK and DBI/DBD drivers

2008-09-18 Thread Daniel Kasak
ould make the whole package ( ie Camelbox ) very desirable if you've got a full-on point-and-click builder for database apps. Dan Daniel Kasak / DNA Application Developer T: +61.2.8968.4056 / F: +61.2.9904.5055 [EMAIL PROTECTED] 24/7 Real Media 15-19 Parraween Street Cremorne, NSW 2090 Australia

Re: Detecting auto-incrementing primary keys

2008-07-05 Thread Daniel Kasak
Damned anti-spam server thinks I'm a spammer ... ... resending with my ISP's mail server. See attached ... --- Begin Message --- This is the mail system at host archeopterix.entropy.homelinux.org. I'm sorry to have to inform you that your message could not be delivered to one or more recipients.

Detecting auto-incrementing primary keys

2008-06-30 Thread Daniel Kasak
Hi all. I'm looking for a *portable* way to detect auto-incrementing primary keys. Is there one? I'm using $dbh->primary_key_info to fetch details about column(s) that are participating in primary keys, but this doesn't mention whether they're auto-incrementing or not, and I must also know this.

Re: fetching the primary key of a table

2008-05-04 Thread Daniel Kasak
On Wed, 2008-04-30 at 21:30 +0530, jagdish eashwar wrote: > Hi, > When I use the following syntax with Oracle, I am able to retrieve the > primary key. But the same syntax doesn't seem to work with MySql. > > @primary_key = $dbh->primary_key($catalog,$schema,$table); > > With my Oracle database,

Re: MSSQL Server driver seems to require the "CONVERT(MONEY, )" syntax.

2007-08-13 Thread Daniel Kasak
o this doesn't matter for us ). Be careful that you don't mangle your data when you do the conversion - back things up first. -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au

Re: most common kinds of cross-database queries

2007-08-01 Thread Daniel Kasak
se open-source software ( ie I assume there's a general trend to migrate from the big commercial DB servers to open-source solutions ). -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 ema

Re: Cross-Database query engine?

2007-08-01 Thread Daniel Kasak
On Wed, 2007-08-01 at 22:13 +0200, Jenda Krynicky wrote: > 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 Acc

Comments on stability of SQLite for storage

2007-07-31 Thread Daniel Kasak
either XML or CSV, but now this is getting more cumbersome that I'd expected. Who has some anecdotal evidence about the reliability of SQLite files for storing data? Should I drop the XML / CSV idea and just use SQLite? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacifi

Re: Cross-Database query engine?

2007-07-24 Thread Daniel Kasak
On Tue, 2007-07-24 at 21:55 -0700, Darren Duncan wrote: > At 9:43 AM +1000 7/25/07, Daniel Kasak wrote: > >Are there any solutions at present for running queries across different > >database servers? If not, I may well write one ... > > Another thing I'll say is

Re: Cross-Database query engine?

2007-07-24 Thread Daniel Kasak
On Tue, 2007-07-24 at 22:44 -0500, David Nicol wrote: > I'm no database expert but I believe I can answer your question. > > On 7/24/07, Daniel Kasak <[EMAIL PROTECTED]> wrote: > > > Link some tables from one database server. > > Link some tables from another

Re: Cross-Database query engine?

2007-07-24 Thread Daniel Kasak
all SQL features are supported > with them, but the ones that are may be enough. > >http://dev.mysql.com/tech-resources/articles/mysql-federated-storage.html > > -- Darren Duncan Thanks for the link. Unfortunately MySQL can only connect to other MySQL servers ( ie not other dat

Re: Cross-Database query engine?

2007-07-24 Thread Daniel Kasak
On Tue, 2007-07-24 at 22:12 -0500, David Nicol wrote: > On 7/24/07, Daniel Kasak <[EMAIL PROTECTED]> wrote: > > doing cross-database queries is drop-dead simple in MS Access, > > really? please explain. Hmmm. Did any thought go into this? OK then. Link some tables fro

Cross-Database query engine?

2007-07-24 Thread Daniel Kasak
well write one ... -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au

Re: ODBC probelms when connecting to MSSQL

2007-06-03 Thread Daniel Kasak
. this seriously screws up MS Access, which can't handle the 'decimal' column type, and treats it as varchar. There are probably other problems too. Do a backup before converting anything. -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney,

Re: MySQL server has gone away?

2006-11-09 Thread Daniel Kasak
it's having ... 'issues'. -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au

Re: Connecting from Linux onto MS-SQL-Server

2006-06-27 Thread Daniel Kasak
DS and DBD::ODBC. DBD::Sybase also works but doesn't support placeholders. Or as others have suggested, DBD::Proxy works ( apparently - a friend swears by it, but I haven't tried it ). -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australi

Interpreting COLUMN_DEF from column_info

2006-06-01 Thread Daniel Kasak
tions_D AS 'Mr' Is there anything available that will parse this for me and return the actual value? I realise I can just grab the stuff in quotes, but I'm just checking if there is a better way. -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Syd

Stored Procedures that return a recordset

2006-05-21 Thread Daniel Kasak
e ) when I prepare a query against SQL Server. I'm writing some stuff that needs to be able to do this in a portable way. -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [

Re: last insert id

2006-04-26 Thread Daniel Kasak
Ron Savage wrote: On Sun, 16 Apr 2006 22:15:22 +1000, Daniel Kasak wrote: Hi Daniel DBI: V 1.47 DBD::mysql: V 3.002 There are critical bugs in the $dbh->column_info() method in DBD::mysql-3.x that prevent us from upgrading :( I've tried a line identical to your: $id = $sel

Re: last insert id

2006-04-16 Thread Daniel Kasak
Stuart Gall wrote: > > On 23 Mar 2006, at 18:24, Greg Sabino Mullane wrote: > >> >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> >>> I am using DBI Version 1.42 on OSX, accessing a MySQL database on >> ... >> >> The last_insert_id() method was broken prior to 1.43, so at the very >> lea

DBD::ODBC - File size limit exceeded

2005-11-27 Thread Daniel Kasak
Greetings. One of our PCs has suddenly started bailing out when opening a DBD::ODBC connection, with the error: File size limit exceeded The line of code it exits on is: my $ms_dbh = DBI->connect( "dbi:ODBC:SQLServer", "some_username",

Re: how do i find out whether column is signed or not?

2005-09-25 Thread Daniel Kasak
you'll have to search in the string for it, but it's better than nothing. Maybe someone else knows a better way? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 ema

ANNOUNCE: Axis Not Evil 0.2 ( Gtk2::Ex::DBI, Gtk2::Ex::Datasheet::DBI, PDF::ReportWriter )

2005-08-01 Thread Daniel Kasak
Greetings. I'm pleased to announce a round of upgrades to the packages making up Axis Not Evil: http://entropy.homelinux.org/axis_not_evil Axis Not Evil is a suit of open-source, cross-platform Perl modules that combine to provide an alternative to a /'leading'/ software vendor's RAD design

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

2005-07-12 Thread Daniel Kasak
er and leave it at that. Thanks again for the reply. Dan -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au

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

2005-07-11 Thread Daniel Kasak
7;t set the table up - I wouldn't have used 'money' anyway, but I'm not sure what effect changing it now will have. Anyone encountered this before? Looks like a bug to me. -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, N

Re: SQL Server and 'set dateformat'

2005-07-06 Thread Daniel Kasak
>do( "set dateformat dmy" ) || die $dbh->errstr; ... actually does the trick, but it *doesn't* work if I do a 'prepare' and 'execute' with the same SQL. Anyway, it's working. Thanks :) -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77

Re: SQL Server and 'set dateformat'

2005-07-06 Thread Daniel Kasak
Ron Savage wrote: >On Thu, 07 Jul 2005 11:38:06 +1000, Daniel Kasak wrote: > >Hi Daniel > > > >>my $sth = $dbh->prepate( "set dateformat dmy" ); >>What am I doing wrong? >> >> > >No idea, but I'd try: >"set dataforma

SQL Server and 'set dateformat'

2005-07-06 Thread Daniel Kasak
e conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. What am I doing wrong? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 e

Re: Attempt to initiate a new SQL Server operation with results pending.

2005-06-27 Thread Daniel Kasak
) says that this won't work if I'm using FreeTDS. Not to worry. $sth->finish everywhere is what's gotten us this far, and SQL Server is only used for legacy stuff anyway. To be honest I'm surprised that it ( connecting to SQL Server from Linux ) works at all. Thanks for the

Re: [dbi] Re: Attempt to initiate a new SQL Server operation with results pending.

2005-06-27 Thread Daniel Kasak
that hack might not work >for FreeTDS. Against MS SQL Server ODBC driver it works - I tried it with your >example. > > That's right. I will keep the ODBC driver option in mind. -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, A

Re: Attempt to initiate a new SQL Server operation with results pending.

2005-06-22 Thread Daniel Kasak
ql I'd be mortified, but I don't have too much to do with SQL server, so I'll just create lots of $dbh things and ->finish all the statements and hope that things hold together while I'm sitting around twiddling my thumbs waiting for MySQL-5.0.x to stabalise ( stored procedure

Re: Attempt to initiate a new SQL Server operation with results pending.

2005-06-21 Thread Daniel Kasak
ures Weapons of Mass Destruction (TM)" ], [ "Advanta BV", "Poisons food supply with GM products" ] ) { $sth->execute( $$company[0], $$company[1] ); } $sth = $dbh->prepare("select ID from some_table") || die $d

QL

2005-04-14 Thread Daniel Kasak
Tim Bunce wrote: >On Thu, Apr 14, 2005 at 09:19:00AM +1000, Daniel Kasak wrote: > > >>Robb wrote: >> >> >> >>>Hi, >>> >>>Does anyone have any idea what is up with Microsoft Access and its >>>ridiculous Date/Time formatti

Re: DBI, MS Access, inserting/updating a Access Date/Time value

2005-04-13 Thread Daniel Kasak
do this, it's selection of day/month/year positions appears to be random. -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au

ANN: Gtk2::Ex::DBI-0.8

2005-03-09 Thread Daniel Kasak
I'm pleased to annouce the 8th release of Gtk2::Ex::DBI ... http://entropy.homelinux.org/Gtk2-Ex-DBI/ Gtk2::Ex::DBI is an open-source helper object that makes your Gtk2-Perl apps data aware. It handles querying, 'painting' records on your Glade-generated form, passing updates back to the database s

Re: MSSQL 2000, ODBC, and placeholders

2005-03-09 Thread Daniel Kasak
relatively new at this, but from what I can see, you've turned off autocommit, but you aren't committing your transaction. Is that right? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 992

ANN: Gtk2::Ex::DBI-0.7

2005-02-10 Thread Daniel Kasak
I'm pleased to annouce the 7th release of Gtk2::Ex::DBI ... http://entropy.homelinux.org/Gtk2-Ex-DBI/ Gtk2::Ex::DBI is an open-source helper object that makes your Gtk2-Perl apps data aware. It handles querying, 'painting' records on your Glade-generated form, passing updates back to the database

What's up with this bit of code?

2005-01-11 Thread Daniel Kasak
return 0; } } } else { $self->{last_insert_id} = \& { $self->{dbh}->last_insert_id }; } return $self; --- What's up with the code in my ODBC case? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au

Attempt to initiate a new SQL Server operation with results pending.

2005-01-11 Thread Daniel Kasak
ternative to adding $sth->finish at the end of each recordset operation? What happens if I have a sub that creates a $sth and loops through it and then exits. The $sth goes out of scope, right? Is this sufficient, or do I have to $sth->finish in these cases as well? Dan -- Daniel Kas

Re: Which driver for SQL Server?

2005-01-10 Thread Daniel Kasak
Michael Peppler wrote: The FreeTDS ODBC drivers support placeholders, IIRC. Are you *sure*? That's what I'm using at the moment ... DBD::Sybase with FreeTDS. When I tried to use placeholders, I got a 'not supported' type error, so I did some googling, and found some discussions where the conclu

Re: Which driver for SQL Server?

2005-01-10 Thread Daniel Kasak
Or am I missing something? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au

Which driver for SQL Server?

2005-01-10 Thread Daniel Kasak
eholders? Don't know. I'll try it out if I have to, but it's feels like a messy solution. Dan -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au

ANN: Gtk2::Ex::DBI-0.5

2004-11-23 Thread Daniel Kasak
Hi all. I'm pleased to announce the 5th release of Gtk2::Ex::DBI ... http://enthalpy.homelinux.org/Gtk2-Ex-DBI/ Gtk2::Ex::DBI is a helper object that makes your gtk2-perl apps data aware. Changes in this release: - Formatting changes in sourcecode. I bought myself a copy of Komodo, and decided t

Re: Fetch the DBD driver type from a database handle?

2004-11-17 Thread Daniel Kasak
Michael A Chase wrote: Quoting Daniel Kasak <[EMAIL PROTECTED]>: Hi all. I'm writing some code that needs to be able to figure out what DBD driver is working with a current database *handle* ( so I can take advantage of more advanced features of some drivers ). How do I do that

Fetch the DBD driver type from a database handle?

2004-11-17 Thread Daniel Kasak
Hi all. I'm writing some code that needs to be able to figure out what DBD driver is working with a current database *handle* ( so I can take advantage of more advanced features of some drivers ). How do I do that? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Hi

Re: Getting a field list from a query with NO results?

2004-08-23 Thread Daniel Kasak
, SCALE, and NULLABLE) even if the resultset is empty. Dean Arnold Presicient Corp. That's *precisely* what I want. Thankyou. Still learning this stuff... -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au

Re: Getting a field list from a query with NO results?

2004-08-23 Thread Daniel Kasak
it. And I'd also like to make it DB-neutral - which is one of the reasons I'm shying away from using a LIMIT clause. I suppose I can figure out why DB server is being used and create a DB-specific query on-the-fly, eg SQL Server would want a "select TOP 1 * from MyTable" ins

$dbh->last_insert_id() not working

2004-06-16 Thread Daniel Kasak
7;t work. It returns undef. I'd like to use last_insert_id() because I want to be able to use this bit of code to handle updates with different databases. What's up? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61)