Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: MySQl connection problem

From: dockimbel::free::fr at: 27-Aug-2001 13:04

Hi Maarteen ! Sorry for the late answer, i was in offline week-end. :) Maarten Koopmans wrote:
> Hi (DocKimbel), >
[...]
> When I use the read syntax (very cool) it works! But 'open gives an access > error due to the DNS mapping! In core 2.5 on Linux. > > The problem is that I have a lot of [ { ? } 'some-val ] like queries that > don't seem to work with read. Is there a way for me to patch te protocol to > disable the reverse DNS when using open/insert/copy/close like in read? Or > can I use the block queries with read as well?
I really don't understand why it is working with 'read and not with 'open ! I need to investigate this issue further...Meanwhile, you can patch the driver so that 'read accepts blocks (I missed that bug). Here's the instructions : - Find the following code in the 'insert function : if throws/closed = catch [ res: either block? data [ - Insert the following line of code : if throws/closed = catch [ if all [string? data data/1 = #"["][data: load data] ; << line to insert res: either block? data [ Now, the driver should be able to handle well blocks as argument to 'read function. But you have to pass a molded block to the join function. See the example : probe read join mysql://[root--localhost]/mysql? mold ["select * from ?" 'user] Hope this helps.
> Thanks (anyway for the cool protocol, my MySQL-C mapping is a bit too heavy > sometimes),
Thanks for helping me improve this driver ! Best regards, DocKimbel.