On Wed, Jun 08, 2016 at 07:49:13PM +0200, Alistair Grant wrote:
> Hi Pierce,
> 
> On Wed, Jun 08, 2016 at 09:22:10PM +0800, Pierce Ng wrote:
> > On Wed, Jun 08, 2016 at 09:50:41AM +0200, Alistair Grant wrote:
> > >   PharoDatabaseAccessor DefaultDriver: GlorpSQLite3Driver.
> > >   session := GlorpBookDescriptorSystem sessionForLogin: login.
> > 
> > Listing 1.12 on page 9 of the PDF says your code is missing a line:
> > 
> >     session login.
> > 
> > The example I posted in the announcement thread also sends #login, but to 
> > the
> > accessor.
> > 
> >   | login accessor |
> >   login := Login new
> >     ...
> >     yourself.
> >   PharoDatabaseAccessor DefaultDriver: GlorpSQLite3Driver.
> >   accessor := PharoDatabaseAccessor forLogin: login.
> > "==>"  accessor login. "<=="
> >   (accessor executeSQLString: 'select * from sqlite_master') explore.
> >   accessor logout.  
> > 
> > If you follow the implementation of GlorpSession>>login you will see that it
> > eventually sends #login to the accessor.
> > 
> > Pierce
> 
> 
> Thanks for your response.  You're right, and I had tried this, however
> asking the session to login results in the following:
> 
> UDBCSQLite3Connection(Object)>>doesNotUnderstand: #queryEncoding
> PharoDatabaseAccessor>>encoding
> GlorpSession>>loginIfError:
> GlorpSession>>login
> GlorpBookDescriptorSystem class>>getSession
> UndefinedObject>>DoIt
> 
> In my image at least, there are no implementers of #queryEncoding.

P.S.  If I add:

UDBCSQLite3BaseConnection>>queryEncoding

        ^#'utf-8'


I'm able to create tables and populate the database (which is as far as
I've got).  But of course, not sure if this is the appropriate solution.

Thanks!
Alistair


Reply via email to