Re: Accessing .mdb files residing on a linux box with the DBI
Curt, I was trying to do just was you suggested to Moritz back in Feburary. Could you post the dbi code you used to connect to the database because I couldn't connect at the time. I didn't know mysql back then either though so I should try it now that I've been using Dbi since April. Since this became a topic I wanted to ask for the code since I'm going to run into the same problem in a few weeks as well. Thanks, Tony
Re: Accessing .mdb files residing on a linux box with the DBI
Seems to read Access files in UNIX is in the "Project Unix", you may check their progress here: http://sourceforge.net/projects/mdbtools --- Curt Russell Crandall <[EMAIL PROTECTED]> wrote: > The *.mdb file IS the Access database. I've tried a > couple of ways to > read it on a UNIX system and nothing worked. Your > best bet is to set up a > similar scheme on a database that sits on your Linux > box (i.e. Postgres, > MySQL, etc). On the Windows machine, load Perl > (like ActiveState > Perl) with DBI, and drivers and client libs for your > target DB. Make a > Perl script to select * and then as your loop > through your result set, > insert it into the target DB. > > If someone has a way to directly read Access > databases on a *NIX system, > I'd love to hear about it. It's been a while, but I > think using DBI Proxy > to connect to an Access DB on windows was one way to > do it. > Even if a method like that worked, I think you'd > eventually want to scrap > using Access altogether and use a real DB that > resides on your Linux box. > > HTH > Curt > > On Sat, 7 Sep 2002, Moritz von Schweinitz wrote: > > > hi, > > > > i have access a database that's stuck (poor thing > ;-) inside a .mdb > > file, and resides on a linux machine via the DBI. > the linux-box is a > > file-server, and the clients access the database > via samba (why would > > anybody do it that way??! i simply don't get it). > > > > i'd really, reallt like my program to run on that > box. > > does anybody have an idea how i can accomplish > this without having to > > ask some windows-machine to tell me what's inside > that DB? i'd be > > perfectly happy with read-only access, if that > makes a difference. > > > > any help is very appreciated, > > > > M. > > > > > __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com
Re: Accessing .mdb files residing on a linux box with the DBI
The *.mdb file IS the Access database. I've tried a couple of ways to read it on a UNIX system and nothing worked. Your best bet is to set up a similar scheme on a database that sits on your Linux box (i.e. Postgres, MySQL, etc). On the Windows machine, load Perl (like ActiveState Perl) with DBI, and drivers and client libs for your target DB. Make a Perl script to select * and then as your loop through your result set, insert it into the target DB. If someone has a way to directly read Access databases on a *NIX system, I'd love to hear about it. It's been a while, but I think using DBI Proxy to connect to an Access DB on windows was one way to do it. Even if a method like that worked, I think you'd eventually want to scrap using Access altogether and use a real DB that resides on your Linux box. HTH Curt On Sat, 7 Sep 2002, Moritz von Schweinitz wrote: > hi, > > i have access a database that's stuck (poor thing ;-) inside a .mdb > file, and resides on a linux machine via the DBI. the linux-box is a > file-server, and the clients access the database via samba (why would > anybody do it that way??! i simply don't get it). > > i'd really, reallt like my program to run on that box. > does anybody have an idea how i can accomplish this without having to > ask some windows-machine to tell me what's inside that DB? i'd be > perfectly happy with read-only access, if that makes a difference. > > any help is very appreciated, > > M. > >
Accessing .mdb files residing on a linux box with the DBI
hi, i have access a database that's stuck (poor thing ;-) inside a .mdb file, and resides on a linux machine via the DBI. the linux-box is a file-server, and the clients access the database via samba (why would anybody do it that way??! i simply don't get it). i'd really, reallt like my program to run on that box. does anybody have an idea how i can accomplish this without having to ask some windows-machine to tell me what's inside that DB? i'd be perfectly happy with read-only access, if that makes a difference. any help is very appreciated, M.
Oracle connectivity problem
Hi, We have recently migrated from Oracle 7.3.4 to Oracle8.1.7 on Sun Solaris 5.8 . Now we are working on both databases , we are able to connect to Oracle 7.3.4 database without any problem, and not able to connect to Oracle 8.1.7 using the PERL5 . It is giving the following error message. "ORA-01019 : unable to allocate memory in the user side" Please can you help me out. Thank in advance Sridhar
RE: Help: how should we handle it if the pl/sql function returning is a cursor?
Sorry, guys, I really should not have sent the origianl help request, actually you guys just discussed the issue a few weeks ago. But after I read the curref.pl, I still can not make my perl script to work. Here is my code, $csr = $dbh->prepare(q{ begin :result := tims.get_all_curr_descs_items(:o_status,:o_error_mesg ,2); end; }); my $temp; $csr -> bind_param_inout(":o_status",\$put_para1,3); $csr -> bind_param_inout(":o_error_mesg",\$put_para2,1); $csr -> bind_param_inout(":result",\$temp,5,{ ora_type => ORA_RSET }); $csr->execute(); $temp->dump_results; $csr->finish(); $dbh->disconnect(); [cshao@beltway ~/test]$ ./timing.pl 0 rows (932: ORA-00932: inconsistent datatypes (DBD ERROR: OCIStmtFetch)) DBD::Oracle::st dump_results failed: ORA-00932: inconsistent datatypes (DBD ERROR: OCIStmtFetch) at ./timing.pl line 44, line 1. What I did was wrong? Thanks for your help. -Original Message- From: Shao, Chunning Sent: Fri 9/6/2002 5:25 PM To: [EMAIL PROTECTED] Cc: Subject: Help: how should we handle it if the pl/sql function returning is a cursor? Hi, everyone, we have a PL/SQL function which is defined as follows, FUNCTION get_all_curr_descs_items ( o_status OUT sp_error_log.error_id%type, o_error_mesg OUT sp_error_log.error_mesg%type, i_metro_idIN traffic_item.metro_id%type, i_minutes_pass_undef IN NUMBER DEFAULT g_undef_rolloff, i_minutes_pass_defIN NUMBER DEFAULT g_defined_rolloff ) RETURN g_generic_cursor_t When we call it from sqlpus, SQL> DECLARE 2 TYPE CURSOR_TYPE_0 IS REF CURSOR; 3 "Return Value" CURSOR_TYPE_0; 4 o_status NUMBER(10); 5 o_error_mesg VARCHAR2(2000); 6 BEGIN 7 8 -- Now call the stored program 9"Return Value" := tims.get_all_curr_descs_items(o_status,o_error_mesg,2); 10 11 -- Output the results 12dbms_output.put_line(SubStr('o_status = '||TO_CHAR(o_status), 1, 255)); 13dbms_output.put_line(SubStr('o_error_mesg = '||o_error_mesg,1,255)); 14 15COMMIT; 16 EXCEPTION 17 WHEN OTHERS THEN 18dbms_output.put_line(SubStr('Error '||TO_CHAR(SQLCODE)||': '||SQLERRM, 1, 255)); 19 RAISE; 20 END; 21 / PL/SQL procedure successfully completed. SQL> but when I call it from perl dbi, $csr = $dbh->prepare(q{ begin :result := tims.get_all_curr_descs_items(:o_status,:o_error_mesg ,2); end; }); $csr -> bind_param_inout(":result",\$temp,5); $csr -> bind_param_inout(":o_status",\$put_para1,3); $csr -> bind_param_inout(":o_error_mesg",\$put_para2,250); $csr->execute(); I got the following error DBD::Oracle::st execute failed: ORA-06550: line 3, column 14: PLS-00382: expression is of wrong type ORA-06550: line 3, column 3: PL/SQL: Statement ignored (DBD ERROR: OCIStmtExecute) at ./timing.pl line 41, line 1. How should I handle if the function return is a cursor instead of a value? Thanks for your help chunning shao DBA traffic.com