Kevin Rosenberg | 1 Sep 2004 17:07
Favicon

Re: Problems connecting an ODBC data source

Klaus Harbo wrote:
> I'm using Lispworks for Windows, Professional Edition, v4.3.7 and 
> Windows XP with Service Pack 2.

I've only lightly tested on Windows XP. But have had success
connecting to Oracle and Postgresql with LWW Pro 4.3.7 and AllegroCL
v7.0beta.

> I downloaded and installed the -latest.tar.gz versions of both CLSQL and 
> UFFI yesterday

Good.

>                    (clsql:connect '("PostgreSQL30" "" "") 

Perhaps your connection parameters are incorrect.
http://clsql.b9.com/manual/odbc.html#id2606785 shows the connection
parameters as (dsn user password). Have you tried putting the username
and password in the connection string?  Are you sure that your
Postgresql server has the correct permissions for connecting from that
system?

> After a bit of stepping in the debugger, I discovered that (what appears 
> to be the first and most basic ODBC-related operation) returns NIL:

I don't agree. (see below)

>    #<Pointer: SQL-HANDLE = #x00EF13F0> is a FLI::POINTER
>    POINTS-TO      NIL
> 
(Continue reading)

Kevin Rosenberg | 1 Sep 2004 17:52
Favicon

Re: Re: Question about :join slots

rm@... wrote:
> Hello and sorry for the late reply, i allready left for vacations when your
> reply came in. To me it looks like somehow the WHERE-clauses needed by the 
> :immediate logic end up in a list which is later on renered to SQL by the 
> method 'database-output-sql ((arg list) database)' in file 'sql/expressions.lisp'
> (using the format string  "(~{~A~^,~})").

Yes, that's where the SQL is generated. But, the proper fix
will be in sql/oodml.lisp where the commands to create SQL code is
generated.

I've added a test for a class with two join classes and have
duplicated the error you reported. I'll work on fixing it.

--

-- 
Kevin Rosenberg
kevin@...
rm | 1 Sep 2004 18:13
Picon

Re: Re: Question about :join slots

On Wed, Sep 01, 2004 at 09:52:09AM -0600, Kevin Rosenberg wrote:
> rm@... wrote:
> > Hello and sorry for the late reply, i allready left for vacations when your
> > reply came in. To me it looks like somehow the WHERE-clauses needed by the 
> > :immediate logic end up in a list which is later on renered to SQL by the 
> > method 'database-output-sql ((arg list) database)' in file 'sql/expressions.lisp'
> > (using the format string  "(~{~A~^,~})").
> 
> Yes, that's where the SQL is generated. But, the proper fix
> will be in sql/oodml.lisp where the commands to create SQL code is
> generated.

I _think_ this is in oodml.lisp/Line 922 ...

> I've added a test for a class with two join classes and have
> duplicated the error you reported. I'll work on fixing it.

Thank's a lot 

   RalfD
> 
> -- 
> Kevin Rosenberg
> kevin@...
Kevin Rosenberg | 1 Sep 2004 20:19
Favicon

Re: Re: Question about :join slots

rm@... wrote:
> I _think_ this is in oodml.lisp/Line 922 ...

correct, there were two problems are in find-all and one in
build-objects that prevented classes with multiple join slots to
operate correctly.

I've released version 3.0.1 with the fixes as well as additions to the
test suite.

Please let me know if you have any problems.

--

-- 
Kevin Rosenberg
kevin@...
Jeff Andrews | 1 Sep 2004 23:37

mysql-loader

Hello,

I am trying to install CLSQL (3.0.1) and configure it to access my 
MySQL databases.
I have tried using asdf-install to do it and then I've tried to do it manually
but upon compilation of the mysql packages, I get the following error.
Note, I receive the errors when I try using SBCL and OpenMCL.  I thought
perhaps it may be a lisp implementation issue, but, nadda.

What am I doing wrong?

(This is on both Linux i386 and Darwin PPC)

* (asdf:operate 'asdf:load-op 'clsql-mysql)

; loading system definition from #P"/usr/local/lib/sbcl/csql/clsql-mysql.asd"
; into #<PACKAGE "ASDF4177">
; loading system definition from #P"/usr/local/lib/sbcl/site-systems/uffi.asd"
; into #<PACKAGE "ASDF4180">
; registering #<SYSTEM UFFI {4863C299}> as UFFI
; registering #<SYSTEM :CLSQL-MYSQL {402594B9}> as CLSQL-MYSQL
; loading system definition from #P"/usr/local/lib/sbcl/csql/clsql-uffi.asd"
; into #<PACKAGE "ASDF4219">
; registering #<SYSTEM CLSQL-UFFI {408DC361}> as CLSQL-UFFI
; loading system definition from #P"/usr/local/lib/sbcl/csql/clsql.asd" into
; #<PACKAGE "ASDF4247">
; registering #<SYSTEM CLSQL {40A61BC9}> as CLSQL

debugger invoked on a TYPE-ERROR in thread 10010:
   The value NIL is not of type (OR (VECTOR NIL) BASE-STRING PATHNAME STREAM).
(Continue reading)

Kevin Rosenberg | 2 Sep 2004 02:42
Favicon

Re: mysql-loader

Jeff Andrews wrote:
> I am trying to install CLSQL (3.0.1) and configure it to access my 
> MySQL databases.
> I have tried using asdf-install to do it and then I've tried to do it 
> manually
> but upon compilation of the mysql packages, I get the following error.
> Note, I receive the errors when I try using SBCL and OpenMCL.  I thought
> perhaps it may be a lisp implementation issue, but, nadda.
> 
> What am I doing wrong?

It's hard to know without a backtrace from the error, but from the
single error message, it appears that the shared library file
libmysqlclient.so is not being found. Make sure that file exists on
your file system in one of the directories searched by
db-mysql/mysql-loader.lisp

Also, asdf-install does not work well for clsql since asdf-install
wants to compile all of the .asd files in a tarball. And, most people
don't have shared libraries installed for all of the database
backends.

--

-- 
Kevin Rosenberg
kevin@...
Jeff Andrews | 2 Sep 2004 04:21

Re: mysql-loader

Ah ha!  You got it.  Once I downloaded the mysql source,
did a ./configure --without-server --enable-shared ; make and then
copy the shared objects (.so and .dylib) to the lib dir under mysql,
all was fine.  Thanks a million, Kevin.

Jeff

>Jeff Andrews wrote:
>>  I am trying to install CLSQL (3.0.1) and configure it to access my
>>  MySQL databases.
>>  I have tried using asdf-install to do it and then I've tried to do it
>>  manually
>>  but upon compilation of the mysql packages, I get the following error.
>>  Note, I receive the errors when I try using SBCL and OpenMCL.  I thought
>>  perhaps it may be a lisp implementation issue, but, nadda.
>>
>>  What am I doing wrong?
>
>It's hard to know without a backtrace from the error, but from the
>single error message, it appears that the shared library file
>libmysqlclient.so is not being found. Make sure that file exists on
>your file system in one of the directories searched by
>db-mysql/mysql-loader.lisp
>
>Also, asdf-install does not work well for clsql since asdf-install
>wants to compile all of the .asd files in a tarball. And, most people
>don't have shared libraries installed for all of the database
>backends.
>
>--
(Continue reading)

Kevin Rosenberg | 2 Sep 2004 05:04
Favicon

Re: mysql-loader

Jeff Andrews wrote:
> Ah ha!  You got it.  Once I downloaded the mysql source,
> did a ./configure --without-server --enable-shared ; make and then
> copy the shared objects (.so and .dylib) to the lib dir under mysql,
> all was fine.  Thanks a million, Kevin.

Great! I hope you enjoy CLSQL.

--

-- 
Kevin Rosenberg
kevin@...
rm | 2 Sep 2004 12:19
Picon

Re: Re: Question about :join slots

On Wed, Sep 01, 2004 at 12:19:34PM -0600, Kevin Rosenberg wrote:
> 
> I've released version 3.0.1 with the fixes as well as additions to the
> test suite.
> 
> Please let me know if you have any problems.

Thanks a lot!
I'll try out the new versions asap.

  RalfD
> -- 
> Kevin Rosenberg
> kevin@...
Klaus Harbo | 2 Sep 2004 18:29

Re: Problems connecting an ODBC data source

Kevin Rosenberg wrote:

> I don't agree. (see below)
> 
> 
>>   #<Pointer: SQL-HANDLE = #x00EF13F0> is a FLI::POINTER
>>   POINTS-TO      NIL
>>
>>Now, I am not yet intimate with this library, but I am hypothesizing 
>>that SQLAllocEnv should NOT return NULL (well, NIL in Lisp terms)?
> 
> 
> I believe that SQLAllocEnv has returned #x00EF13F0 which happens to
> point to NULL, I believe your connection problem is elsewhere.
> 
> 
>>  UFFI 12 > uffi::*loaded-libraries*
>>  ("C:\\windows\\system32\\odbc32.dll" "L:\\sys\\clsql\\uffi\\uffi.dll")
>>it looks like the DLL was correctly loaded (?).  But why, then, does 
>>SQLAllocEnv seem to fail???
> 
> 
> I agree about the libraries, but it appears that SQLAllocEnv did
> return a pointer/handle for you. Whether it's okay for it to point to
> NULL, I'm not sure. I might recommend manually going through the
> connection process, like you have started with SQLAllocEnv and
> watching the results of the library interaction after you have tried
> changes to your connection specifications as above.
> 
> Good luck!
(Continue reading)


Gmane