david aaron vrooman
2006-08-31 15:53:01 UTC
i mentioned this in a previous email, but it was jumbled in with some
other things, so i thought i'd put in a separate email.
starting on page 37 is the Monitoring and logging your session
section. the discussion on pgSQLstateReceiver doesn't seem to work. i
believe the main problem is that the incoming SourceSocket in the
ReceiveStateChange method is a pgsQLqueryReceiver. it appears that
the only methods available to a pgsQLqueryReceiver are:
QueueQuery
SendExtendedQuery
if you cast the pgSQLsourceSocket property to a pgSQLcoreSocket
everything seems to work. that means the code for the PushButton's
Action event should be:
If me.Caption = "Connect" Then pgSQLcoreSocket
(me.pgSQLsourceSocket).Connect
If me.Caption = "Disconnect" Then pgSQLcoreSocket
(me.pgSQLsourceSocket).Disconnect
note that you have to manually connect the socket at least once
before the button will work: you will get a NilObjectExceptionError
otherwise because nothing has been stored in the pgSQLsourceSocket
property.
dave
other things, so i thought i'd put in a separate email.
starting on page 37 is the Monitoring and logging your session
section. the discussion on pgSQLstateReceiver doesn't seem to work. i
believe the main problem is that the incoming SourceSocket in the
ReceiveStateChange method is a pgsQLqueryReceiver. it appears that
the only methods available to a pgsQLqueryReceiver are:
QueueQuery
SendExtendedQuery
if you cast the pgSQLsourceSocket property to a pgSQLcoreSocket
everything seems to work. that means the code for the PushButton's
Action event should be:
If me.Caption = "Connect" Then pgSQLcoreSocket
(me.pgSQLsourceSocket).Connect
If me.Caption = "Disconnect" Then pgSQLcoreSocket
(me.pgSQLsourceSocket).Disconnect
note that you have to manually connect the socket at least once
before the button will work: you will get a NilObjectExceptionError
otherwise because nothing has been stored in the pgSQLsourceSocket
property.
dave