[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SchemeQL
MJ Ray <markj@cloaked.freeserve.co.uk> writes:
[...]
> PostgreSQL, set to ODBC version 2.5.
>
> Your code (with appropriate changes) gives me
>
> ((IM002 0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified))
>
> OK, this looks more like an ODBC installation problem, doesn't it?
Maybe only a configuration one.
[...]
> There's isql, but I can't figure out what is my DSN (dbms parameter in
> the schemeql) really. Niether the database name nor the host name
> work, though.
DSN is usually your hostname. dbms in SchemeQL is (or so I wanted it
to be) the name of your ODBC data source. For instance, I use (as I
told you before) Myodbc + libiodbc, and I have the following odbc.ini:
,--------------------
| [ODBC Data Sources]
| Myodbc = Myodbc
| Sample = Openlink Generic ODBC Driver
|
| [Myodbc]
| # DSN = biblio06
| # the path where you installed myodbc.so
| Driver = /usr/local/lib/libmyodbc.so
| Host = localhost
| Database =
| # Server = biblio06.fciencias.unam.mx
| Port = 3306
| User = USER
| Password = PASSWORD
`--------------------
(Lines starting with `#' are comments.) And so, I use (in SchemeQL):
"Myodbc" as the dbms parameter, USER as the login, and PASSWORD as
passwrd in:
(connect-to-database dbms login passwd)
then, to select a particular database, I use:
(use-database "database-name")
note though, that the "USE" command is not in the minimum SQL grammar,
and an ODBC driver is not required to support it. If your DBMS does
not support (PostgreSQL do) the USE command, then the
connect-to-database should have received the "default" database on
connection, and you have to specify which database will be the default
in the odbc.ini-alike file.
Does this make sense?
>> [...] Having the ODBC driver running is 90% of the job, the other
>> 10% is compiling SrPersist, but I take it you have already done
>> this, right?
>
> As far as I can tell... make and then copying it to the right place
> (as there is no archsys command here). It loads happily.
archsys is a shell script accompanying the PLT distribution, add
${PLTHOME}/bin to your PATH, and try again. It is a good idea to run
the install script (also in the PLT distro) after moving/copying
things around.
>> MyODBC also requires an "odbc.ini" file with information about the
>> driver, host, port, etc., and it usually goes in /etc, or /usr/local/etc.
>
> I've cribbed one from the unixodbc site, but maybe that's the problem.
Indeed, sounds like it is.
--Francisco
--
Are we running light with overbyte?
- References:
- SchemeQL
- From: MJ Ray <markj@cloaked.freeserve.co.uk>
- Re: SchemeQL
- From: Francisco Solsona <solsona@acm.org>
- Re: SchemeQL
- From: MJ Ray <markj@cloaked.freeserve.co.uk>