VDataBase_IsOpen( gDBRef ) fails
william humphrey
bill at bluewatermaritime.com
Tue Dec 15 09:37:16 CST 2009
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macserve.net/pipermail/valentina/attachments/20091215/3e3708b6/attachment-0001.html
More information about the Valentina
mailing list