Ok, thanks. You seem to be right, but I got stuck halfway
unfortunately. One problem I have is understanding the
workings of slime, swank and sbcl. If I eval something
within an emacs buffer by M-C-x, where does that happen?
It doesn't influence the environment started with M-x slime,
right? I got confused about this. So the repl and the
evaluations are two separate things, I guess...
However I am not sure where the mentioned (C-c C-v i) should
go for instance. Sorry if I am slow, but I don't really grasp it
yet :-(.
I managed to to connect to my mysql database by executing
the clsql-tutorial.lisp file (from clsql/examples) with (load
#p"...").
However I during file evaluation I get an error after the connection
is established:
The value 0
is not of type
(OR (VECTOR CHARACTER) (VECTOR NIL) BASE-STRING SYMBOL
CHARACTER).
[Condition of type TYPE-ERROR]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [ABORT] Return to SLIME's top level.
2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread"
RUNNING {AE730F9}>)
Backtrace:
0: (STRING-EQUAL "YES" 0)[:EXTERNAL]
1: ((SB-PCL::FAST-METHOD CLSQL-SYS::OUTPUT-SQL (CLSQL-SYS::SQL-
CREATE-TABLE T)) #<error printing object>)
2: (CLSQL-SYS::SQL-OUTPUT #<error printing object>)
3: ((SB-PCL::FAST-METHOD EXECUTE-COMMAND (CLSQL-SYS::%SQL-
EXPRESSION)) #<error printing object>)[:EXTERNAL]
4: ((SB-PCL::FAST-METHOD CLSQL-SYS::%INSTALL-CLASS (CLSQL-
SYS::STANDARD-DB-CLASS T)) ..)[:EXTERNAL]
5: (CREATE-VIEW-FROM-CLASS EMPLOYEE)[:EXTERNAL]
(...)
I have no idea where to find that in the code. How can I relate
the error to the content of the source file? I checked the sbcl
debugger docs, but couldn't find anything. Since number 5
mentions create-view-from-class, I inspected it with the
(M-.) you tought me, but it didn't show me anything I could
relate to the error.
Could you please help me out some more?
Thanks,
Felix
On 2 Jul., 04:36, nunb <[email protected]> wrote:
> The clsql.pdf doc file lists connection strings in an appendix.
>
> The simplest db to start with is probably sqlite (apt-get sqlite3)
>
> In package clsql-user evaluate
>
> (asdf:operate 'asdf:load-op 'clsql-sqlite3)
>
> Then at a shell use `sqlite /tmp/ex.db` and use .exit to quit.
>
> Check that it exists: `ls /tmp/*.db`
>
> At repl: (connect '("/tmp/ex.db") :database-type :sqlite3)
>
> This will set *default-database* so check its value.
>
> All this is from clsql.pdf -- which has instructions for the other db
> types too, if you need to use something else.
>
> At this point the def-view-from-class should work fine.
>
> Post any further developments.
--
You received this message because you are subscribed to the Google Groups
"weblocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/weblocks?hl=en.