Hi Eliot,

Thanks for the suggestion. I did check the connection again and it seems that something was wrong with System-wide DSN. Everything seems to work properly with User DSN.

Thanks everyone for all the help.

Doru

On 20 Jul 2010, at 00:13, Eliot Miranda wrote:

Hi Doru,

On Mon, Jul 19, 2010 at 1:51 PM, Tudor Girba <[email protected]> wrote:
Thanks Eliot.

Indeed this allowed me to connect, but now I have problems executing even simple queries. For example, when executing the following code, the sqlAllocStmtConnection:statement: fails saying "Could not coerce arguments":

connection := ODBCConnection dsn: 'Test' user: '' password: ''.
connection query: 'select * from TABLE'

Am I doing something wrong, or is it something else?

difficult to know. I was using ODBC & mysql to test the threaded VM late last year but I haven't ported this to Snow Leopard. Anyway, I used Apple's ODBC tools and the mysql tools to check the database was setup correctly before I used the ODBCConnect code. Apple's recently released their ODBC tools for SNow Leopard http://reviews.cnet.com/8301-13727_7-10330516-263.html . So I recommend using the relevant tools to check the DB is configured correctly before you try and debug ODBCConnect.

cheers,
Eliot


Cheers,
Doru


On 19 Jul 2010, at 19:39, Eliot Miranda wrote:

moduleName
       "Return the name of the module for this library"
       Smalltalk platformName = 'Win32' ifTrue:[^'odbc32'].
       Smalltalk platformName = 'unix' ifTrue:[^ 'libodbc.so'].
       Smalltalk platformName = 'Mac OS' ifTrue:[^ 'libiodbc.dylib'].
       ^self error: 'Don''t know the ODBC library name'

works for me.  Find attached.

On Mon, Jul 19, 2010 at 1:41 AM, Tudor Girba <[email protected]> wrote:
Hi,

Thanks for all the pointers. I am now testing on Mac using the Actual driver:
http://www.actualtech.com/product_access.php

I managed to get it running, but now I have problems with the ODBC Pharo implementation because there seems to be no module for Mac:

ODBCLibrary class>>moduleName
      "Return the name of the module for this library"
SmalltalkImage current platformName = 'Win32' ifTrue: [ ^ 'odbc32' ]. SmalltalkImage current platformName = 'unix' ifTrue: [ ^ 'libodbc.so' ].
      ^ self error: 'Don''t know the ODBC library name'

Is there something to be done in this area?

Cheers,
Doru


On 19 Jul 2010, at 01:04, Germán Arduino wrote:

Yes, Indeed, I mean, I used a driver to access, but can't remember now
the brand, but I'm sure I not payed for it :)

May be I used some trial version....

2010/7/18 Levente Uzonyi <[email protected]>:

On Sun, 18 Jul 2010, Germán Arduino wrote:

Not, I'm not talking of propietary software.

I'm talking of one I used when helped Diego with the testing of the
odbc package. Don't remember now, but may be this
http://www.unixodbc.org/ ?

ODBC is just an API, if you don't have a driver for yourdatabase, then it
won't help.


Levente


About Mac, sorry, never touched a mac in all my life....

Cheers.


2010/7/18 Levente Uzonyi <[email protected]>:

On Sun, 18 Jul 2010, Germán Arduino wrote:

Hi Tudor:

Is as Levente says, you must define an ODBC source on a Windows PC
(Alternatively on Unix you can use ODBC also).

I don't know any free ODBC drivers for Access on un*x. I only know a
driver
which costs 4-5 times more than the windows OS itself :). But
there's a driver for mac which costs only 30 usd if you're interested.


Levente


Some examples on: http://wiki.squeak.org/squeak/2480

Cheers.
Germán.


2010/7/18 Levente Uzonyi <[email protected]>:

On Sun, 18 Jul 2010, Tudor Girba wrote:

Thanks Mariano!

Indeed, if I load ConfigurationOfFFI first, everything loads well.

I am a complete newbie in this area. Can anyone tell me what I should
do
next?

I imagine that I should connect to an Access server. If yes, how would
I
do that?

Also, do I need anything else, like a C plugin/library to get the C
calls
from ODBCLibrary going?

First you'll need a pc running windows. Then you have to create an ODBC
Data
Source for your Access file. Then you'll be able to create a connection
to
that datasource from your image.


Levente


Cheers,
Doru


On 18 Jul 2010, at 09:17, Mariano Martinez Peck wrote:



On Sun, Jul 18, 2010 at 8:49 AM, Tudor Girba <[email protected]>
wrote:
Hi,

I tried loading it, but I get :
"This package depends on the following classes:
ExternalLibrary
ExternalStructure"

Can anyone tell me where to find these from?

This means that you need Metacello ;)

Those classes are from FFI, a pre-requisite for ODBC to work.
Maybe there is a ConfigurationOfODBC somewhere...

For the moment, I recommend you to install FFI using the
ConfigurationOfFFI.

Cheers

Mariano


Also, are there eternal prerequisites to work with ODBC?

Cheers,
Doru



On 18 Jul 2010, at 00:35, Levente Uzonyi wrote:

On Sat, 17 Jul 2010, Tudor Girba wrote:

Hi,

Is there a way to connect to a Microsoft Access database from Pharo?

Yes, with ODBC.


Levente


I have an mdb file of 300 Mb that I would need to analyze.

Cheers,
Doru


--
www.tudorgirba.com

"Next time you see your life passing by, say 'hi' and get to know
her."





_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
www.tudorgirba.com

"Speaking louder won't make the point worthier."




_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
www.tudorgirba.com

"When people care, great things can happen."





_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project




--
=================================================
Germán S. Arduino  <gsa @ arsol.net>   Twitter: garduino
Arduino Software & Web Hosting   http://www.arduinosoftware.com
PasswordsPro  http://www.passwordspro.com
=================================================


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
www.tudorgirba.com

"Every thing should have the right to be different."





_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

<ODBCLibrary class- moduleName.st>_______________________________________________

Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
www.tudorgirba.com

"Every thing has its own flow."





_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
www.tudorgirba.com

"One cannot do more than one can do."




_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to