tag:blogger.com,1999:blog-7570364353928786565.post1898307428568301297..comments2023-10-16T06:08:01.821-07:00Comments on Web, Development, Functional Programming, and Scheme: Extensible Abstract Database Interface for PLT SchemeUnknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7570364353928786565.post-16870685160929265792010-04-02T15:13:38.260-07:002010-04-02T15:13:38.260-07:00Hi - the reason that you are seeing the error of &...Hi - the reason that you are seeing the error of "keywords" is that you did not escape the keyword with quote.<br /><br />so instead of #:<keyword>, you need to use <b>'#:<keyword></b>.<br /><br />In the case of jazmysql, it means you need to pass the following (note the quote in front of #:schema):<br /><br />(define handle (connect 'jazmysql "localhost" 3306 "user" "password" '#:schema "database")) <br /><br />The reason is because the keyword #:schema is passed to the underlying jaz/mysql driver as a variable. When it is not quoted, PLT Scheme treat it as the keyword variable for connect.<br /><br />HTH.ychttps://www.blogger.com/profile/11915946249340014269noreply@blogger.comtag:blogger.com,1999:blog-7570364353928786565.post-36352370365737269912010-03-25T13:50:24.497-07:002010-03-25T13:50:24.497-07:00Stumped!
New to Scheme, and I am not a programmer...Stumped!<br /><br />New to Scheme, and I am not a programmer by trade. I'm excited about the MySQL interface, as I do a fair amount of things with that.<br /><br />Here's my problem (and I'm quite sure it's something really basic):<br /><br />I can connect using the following:<br /><br />(define handle (connect 'jazmysql "localhost" 3306 "user" "password" ))<br /><br />However, when I try to pass the optional database to connect to, it fails:<br /><br />(define handle (connect 'jazmysql "localhost" 3306 "user" "password" #:set-current? "database" ))<br /><br />connect: does not accept keyword arguments; arguments were: jazmysql "localhost" 3306 "user" "password" #:set-current? "database"<br /><br /><br />If I just pass the database name to connect,procedure it also fails:<br /><br />connect: expects 4 arguments plus optional arguments with keywords #:schema, #:set-current?, and #:use-ssl?, given 5: "localhost" 3306 "user" "password" "database" <br /><br />So, in one instance scheme is telling me that connect will accept optional arguments, and in the next it says it won't.<br /><br />Cornfusement reigns!Anonymousnoreply@blogger.com