From owner-freebsd-questions Tue Feb 25 13:15:48 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F60237B401 for ; Tue, 25 Feb 2003 13:15:45 -0800 (PST) Received: from p6m7g8.com (pcp02835904pcs.hyatsv01.md.comcast.net [68.54.254.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E4E043FA3 for ; Tue, 25 Feb 2003 13:15:44 -0800 (PST) (envelope-from philip@p6m7g8.com) Received: from p6m7g8.com (localhost [127.0.0.1]) by p6m7g8.com (8.12.6/8.12.7) with ESMTP id h1PGFZRh002862; Tue, 25 Feb 2003 16:15:35 GMT (envelope-from philip@p6m7g8.com) Received: from localhost (localhost [[UNIX: localhost]]) by p6m7g8.com (8.12.6/8.12.7/Submit) id h1PGFYhd002859; Tue, 25 Feb 2003 16:15:34 GMT Content-Type: text/plain; charset="iso-8859-1" From: "Philip M. Gollucci" Organization: eJournalPress To: Bill Moran , Trent Nelson Subject: Re: Oracle on FreeBSD Date: Tue, 25 Feb 2003 16:15:34 +0000 User-Agent: KMail/1.4.3 Cc: Mike Meyer , synrat , questions@freebsd.org References: <1046128729.490.8.camel@dethstar> <20030225184430.GA73776@limekiln.vcisp.net> <3E5BBF62.2070607@potentialtech.com> In-Reply-To: <3E5BBF62.2070607@potentialtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200302251615.34473.philip@p6m7g8.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The most notable of these would be date/time and null handling. Also=20 parameter binding. One big one you'll hit with Oracle is trying to inser= t a=20 string > 2000 characters with ODBC into a LONG column. another i.e.=20 ORACLE to_date('2003/01/03' '12:05:03 A.M.') MSSQL 2003/01/03' '12:05:03 MySQL 2003-01-03 00:05:03 Oracle will also run queries with unbound parameters if you forget one an= d=20 just return nothing or cause an infinite loop. MSSQL not only won't but "= let=20 you mix parameter styles" if you bind some of them and not others. Joing tables you'll also find is different. (+)=3D vs *=3D in ORACLE vs = MSSQL Concat tables -- || in Oracle, I forget MSSQL of the top of my head. Finally, you can't have conncurrent database handle access in I think any= thing=20 other then ORACLE. There is a way to get around all these and thats to wrap all your databas= e=20 calls in wrappers in addition to the ODBC connect/dissconect calls. You will have to make multiple passes. =20 I've been successful with this so that I can reliably run MySQL-4.1 (sub=20 selects), MSSQL, Oracle 8.1.7 and probably 9i. Of course you'll never really get the sequences right unless you just use= an=20 Ids table, but that throws away some maybe functionality on MySQL and Ora= cle=20 so you need another wrapper for. DBIx::OracleSequencer from CPAN is a go= od=20 module... don't get me wrong, but its much easier to just write out selec= t=20 $seq\.nextval from dual ... Then you don't have to worry about commenting= it=20 out on systems that don't have it or eval(). Just an "if" around the my = $sql=20 =3D "whatever". On Tuesday 25 February 2003 19:09, Bill Moran wrote: > The whole "ODBC compatiblity" thing is (unfortunately) a lie. Nobody h= as > stood up and constrained the standard enought to make it truely compati= ble > across all databases. --=20 END=20 -------------------------------------------------------------------------= -----=20 Philip M. Gollucci philip@p6m7g8.com 301.474.9294 301.646.3011 (cell)=20 Science, Discovery, & the Universe (UMCP)=20 Webmaster & Webship Teacher=20 URL: http://www.sdu.umd.edu=20 eJournalPress=20 Database/PERL Programmer & System Admin=20 URL : http://www.ejournalpress.com=20 Resume : http://p6m7g8.net/Resume=20 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message