VDataBase_IsOpen( gDBRef ) fails

william humphrey bill at bluewatermaritime.com
Tue Dec 15 09:39:58 CST 2009


Just looking at it now I notice that I called the constructor twice for some
weird reason...  I remember that when I wrote this I was having no end of
trouble.

On Tue, Dec 15, 2009 at 11:37 AM, william humphrey <
bill at bluewatermaritime.com> wrote:

> My database open (runs once only in mainstack on open card) looks like
> this:
>
> note:  I don't have any special stuff there for windows so I wonder if that
> is bad?
>
>
>  *on* DatabaseOpen
>
>    *put* "" into field error_field  of card "Client Card" of stack
> "clients"
>
>    *put* "" into field IsOpenField  of card "Client Card" of stack
> "clients"
>
>    *put* "" into field "record ID"  of card "Client Card" of stack
> "clients"
>
>    *put* "" into field "total records"  of card "Client Card" of stack
> "clients"
>
>
>
>    *get* Valentina_InitClient( 10 * 1024 * 1024,"hulking long serial
> number",,)
>
>    *get* Valentina_DebugLevel("kLogParams")
>
>    *put* VConnection_Constructor("localhost", "sa", "sa", 15432) intogConnection
>
>
>
>    *if*  VConnection_Open( gConnection ) contains "ERROR" *then*
>
>       *answer* error Valentina_ErrString()
>
>       *return empty*
>
>    *else*
>
>       *--nothing here*
>
>    *end* *if*
>
>    *put* VDatabase_Constructor( gConnection ) into gDatabase
>
>    *get* VDatabase_DateFormat(gDatabase, "kYMD")
>
>    *get* VDatabase_DateSep(gDatabase, "-")
>
>    *get* VDatabase_Open( gDatabase, b_l_database.vdb )
>
>
>
>    *if* it contains "ERROR" *then*
>
>       *answer* "there was an error in DatabaseOpen"
>
>    *end* *if*
>
> *end* DatabaseOpen
>
>
> Then I call (just to be sure that it really opened):
>
>
> *on* ShowStatistics
>
>    *put* VDatabase_Name( gDatabase )  into field "error_field" of card "Client
> Card" of stack "clients"
>
>    *put* VDatabase_IsOpen( gDatabase ) into field "IsOpenField" of card "Client
> Card" of stack "clients"
>
> *end* ShowStatistics
>
>
> then I call (if the show statistics was ok) a bunch of stuff that pulls
> data from the database and fills out cards, option buttons etc.
>
>
>
>


-- 
http://www.bluewatermaritime.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macserve.net/pipermail/valentina/attachments/20091215/d370f7f4/attachment.html 


More information about the Valentina mailing list