Sorry, I seem to be coming back to this thread after a while. Did you get thru the making of the sqlite3 database fine? Are you able to connect *at all* using clsql?
> 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 The C-c C-v i was not necessary, I only used it to illustrate how to "inspect" an object in the REPL (the swank repl, that is). I apologize for bringing in swank-slime stuff, that's just confused the issue at hand, which is clsql+sbcl. You can also do (describe *some-var*) or (inspect *some-object*) instead at a plain repl. > I managed to to connect to my mysql database by executing > the clsql-tutorial.lisp file (from clsql/examples) with (load > #p"..."). > That sounds like a promising first step. I would recommend the following steps to see where we're at: Start a fresh repl [a], and get to the step above where (load #p"..") is successful. [a] -- preferably with `rlwrap sbcl` at a bash/shell prompt, or see Leslie's start cmd with aclrepl Then at the repl type: clsql::*default-database* and after pressing enter, type (clsql::connected-databases) What are the values of those expressions? > 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 > We'll handle this when we know if *default-database* is set properly! Also, stick with it, the lisp way is certainly different, but a lot more fun and productive! And actually, once everything is set up properly, jumping around in the weblocks code is very easy, at least in emacs with M-. (but the combination of lisp + learning emacs is a bit tough). A graphical emacs helps, in many cases you can just right click and choose from a menu, eg in the slime repl you can right click and choose inspect instead of C-c C-v i I was in the same position as you a few years back (we've all been there, I guess!) -- but I conquered the emacs beastie in the terminal, and so I highly recommend a graphical beastie -- easier to slay! Lastly, I have also found clsql a bear because it depends on uffi/cffi -- luckily you don't seem to be having those problems, and I think we can get you over the hump quite quickly. FWIW, I used cl-prevalence, because it was easy to deal with (you just work with lisp objects, link them however you like, and you don't need to worry about a DB at all -- imho rather than using an ORM, just use an object DB like cl-prevalence -- if I'm not mistaken, that's what Venkat's project does in some form -- a distributed object db). But perhaps your project depends on connecting to a legacy database? To be fair, I did use clsql to suck out all the data from a MS Sqlserver database, and munge it into our CLOS objects, and it worked flawlessly for that, so it's just that it's sometimes a bit hard to get started with it. hth, nandan -- 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.
