Re: SQLite - problem connecting to database (or doing a select)
From: James Willmore (jwillmore_at_fastmail.us)
Date: 11/30/04
- Next message: Uri Guttman: "Re: perl trim function"
- Previous message: Ben Morrow: "Re: Transiting from Perl: Learn Python or Ruby?"
- In reply to: Alex Hunsley: "Re: SQLite - problem connecting to database (or doing a select)"
- Next in thread: Alex Hunsley: "Re: SQLite - problem connecting to database (or doing a select)"
- Reply: Alex Hunsley: "Re: SQLite - problem connecting to database (or doing a select)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Nov 2004 12:39:36 -0500
On Tue, 30 Nov 2004 16:57:22 +0000, Alex Hunsley wrote:
> Alan Mead wrote:
>> On Tue, 30 Nov 2004 16:27:51 +0000, Alex Hunsley wrote:
>>
>>
>>>I've having a problem running a tiny snippet of test code that uses
>>>SQLite to connect to a local database (I'm running xampp on my local
>>>machine which includes mysql).
>>
>>
>> SQLite doesn't connect to other RDBMS... it's claim to fame is that it is
>> it's own RDBMS. So the error you're getting says "There is no SQLite
>> database of that name" which is true because it's a *MySQL* database.
>>
>> You need to pick one, MySQL or SQLite for your project. Both come with a
>> client and a DBD library for accessing them in Perl.
>
> I've recently realised my folly :)
> Basically, I just want to be able to access an sql database from perl. I
> thought it would be simple to get going :[
> Been trying to get DBD::mysql going; latest is to download DBD::mysql
> manually and configure it that way, but problems with that too.
> Unfortunately I don't have time to spend ages just getting perl to talk
> to an SQL server due to a looming deadline, so I may just have to ditch
> the perl idea and find something else I can get working quickly.
> I don't suppose you know of a simple-to-get-working module that would
> fulfill my wildest SQL server connection dreams?
A few suggestions ....
1) You *might* be able to use the DBD::Proxy module to connect.
Basically, if you can install DBD::mysql on the machine that has MySQL
installed, you could run a proxy on that box and have the clients
(scripts) connect to the proxy. I can't say I've ever done it, but I've
read about it :-)
2) Try another DBD module. For example, you might be able to use the
DBD::JDBC module to connect to the MySQL database. Now all you need to do
is use the appropriate Java driver for connection (far easier to install
:-) ). Or DBD::ODBC. *Most* RDBMS's support ODBC connections. Simple if
you're on a Windows box, a little more effort of you use *nix box.
3) Use the MySQL client application within Perl using 'system' or 'open'
or some other method used to execute commands within Perl.
4) For pre-made scripts and applications, visit Freshmeat
(http://freshmeat.net). I'm sure you'll find something there :-)
Of course, you could just follow the directions given in the DBD::mysql
README to install the proper driver :-) And contact the suthor of the
module if you're having that much trouble installing it :-)
HTH
Jim
- Next message: Uri Guttman: "Re: perl trim function"
- Previous message: Ben Morrow: "Re: Transiting from Perl: Learn Python or Ruby?"
- In reply to: Alex Hunsley: "Re: SQLite - problem connecting to database (or doing a select)"
- Next in thread: Alex Hunsley: "Re: SQLite - problem connecting to database (or doing a select)"
- Reply: Alex Hunsley: "Re: SQLite - problem connecting to database (or doing a select)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|