Attached is an old email I have that helped others. 


On 28-Nov-01 Patrick Dennis wrote:
> Hello,
> 
> I've seen a few messages in here a while back explaining how to setup Perl
> DBI, DBD::ODBC using the Red Brick ODBC driver (and either the iODBC or
> unixODBC driver manager) to gain access to the Red Brick database.  There
> seems to be some issues around SQLDescribeParam which requires some altering
> off the MakeFile.PL script and I was wondering if someone had a complete
> instructions on how to do this.
> 
> Currently we have our Perl scripts running on a Win2K machine connecting to
> a Red Brick database using the Red Brick risql Win32 client.  I would like
> to migrate all of those Perl scripts to a Linux box but I need to test the
> DBI/DBD::ODBC on a Linux box.
> 
> If anyone can help me out or point me in the right direction, I would very
> much appreciate it.
> 
> Regards,
> 
> Patrick Dennis
> 

----------------------------------
E-Mail: Scott T. Hildreth <[EMAIL PROTECTED]>
Date: 28-Nov-01
Time: 07:53:25
----------------------------------
Thanks a million;
I haven't got all the test to run yet, but I'm connecting and
pulling data!   I wasted more than 1 night on this.
thanks again,
-shawn

> -----Original Message-----
> From: Scott T. Hildreth [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, November 24, 1998 8:17 AM
> To:   Holladay, Shawn
> Cc:   [EMAIL PROTECTED]
> Subject:      RE: Redbrick-perl
> 
> 
> Hi Shawn,
> 
>      I know that it is frustrating, so I wiil help in anyway that I can.
> I would definitely use the Redbrick's ODBC driver since it is specific to
> Redbrick, I'm not an expert, I believe you have to use the Redbrick driver
> to access the database, since it is the ODBC Calls that compliant, not how
> they are implemented.  Here are some checks to get started.
> 
> -In your ODBC-20 directory change the Makefile.PL
> 
>     #my $libs   = "odbc";
>     my $libs   = "rbodbc";
>     #$opts{LIBS} = " -L$lib_d1 -R$lib_d1 -L$lib_d2 -R$lib_d2 -l$libs";
>     $opts{LIBS} = " -L$lib_d1 -l$libs";
> 
>     my $myodbc = 'rbodbc';      # edit and hack to suit!
> 
>  add :
> 
>      elsif ($myodbc eq 'rbodbc')
>     {
>         $opts{INC} .= " -I$ENV{ODBCHOME}/include";
>         $opts{DEFINE}  = "";
>         print SQLH qq{#include <rbsql.h> \n#include <rbsqlext.h>\n};
>     }
> 
> -Make sure you have the enviorment variables set :
> 
> ODBCHOME=/usr/redbrick/odbc - where you have the rbodbc lib/ & include/
> 
> DBI_DSN=dbi:ODBC:spring
> DBI_PASS=manager
> DBI_USER=system
> 
> -Also you have to have a .odbc.ini in your $HOME, a template is in
> the redbrick odbc directory.
> 
> -In the DBD-ODBC-0.20 directory add this to the dbdimp.c code :
> 
> RETCODE SQL_API SQLDescribeParam (
>             HSTMT       hstmt,
>             UWORD       ipar,
>             SWORD  FAR* pfSqlType,
>             UDWORD FAR* pcbColDef,
>             SWORD  FAR* pibScale,
>             SWORD  FAR* pfNullable )
> {  return SQL_ERROR; }
> 
> ..Then remake DBD::ODBC.
> 
> If this works, some notes on the tests,
> 
> -in the t/ directory there is the ODBCTEST.pm. I changed
>  
>            foreach $type (@{ $TestFieldInfo{$f} }) {
>                 $sth = $dbh->func($type, GetTypeInfo);
>                 # probably not right, but get the first compat type
>                 @row = $sth->fetchrow();
>                 last if @row;
>             }
>             print "\n\nUnable to find a suitable test type for field
> $f\n\n"
>                 unless @row;
>             /\
>             || 
>             This was a die, but I changed it to print, since Redbrick ODBC
> 
>             returns a 0 for SQL_CONVERT_LONGVARCHAR, obviously
> unsupported,
>             but I want the rest of the test to finish.
> 
> The tab_create() fails because of syntax, I have not gotten back to
> changing
> the test, but I can connect, and I plan to finish testing by accessing a 
> database I have stored in Redbrick.
> 
> I hope this helps. 
> 
>                                       STH
> 
> On 24-Nov-98 Holladay, Shawn wrote:
> >Scott,
> >I've noticed your last couple letters on  the DBI archives about 
> >installing DBD:ODBC on your Digital Box.   I'm having the same problems
> >that you were with the "infamous dynaloader" (unable to load ODBC.so).
> >I'm also on Digital (OFS V4.0 (rev 564)) trying to connect to Redbrick v
> >5.0.15.
> >I'm already on DBI 1.02 and ODBC 0.20, but I'm having the same dynaloader
> >problem.
> >I was wondering if you knew of any other problems with this setup to
> cause
> >this problem?  Is it better to try use redbrick's ODBC driver
> (librbodbc.so)
> > over the packaged one with the ODBC module (iodbc-2.12.so)?  Same
> problem
> >for me either way.   Any information will be greatly appreciated.
> >thanks,
> >[EMAIL PROTECTED]
> 
> ----------------------------------
> E-Mail: Scott T. Hildreth <[EMAIL PROTECTED]>
> Date: 24-Nov-98
> Time: 09:16:39
> 
> This message was sent by XFMail
> ----------------------------------

Reply via email to