Back to getting vServer Office to execute in LiveCode Server Scripts on my IIS 5.1 web server

Barry G. Sumpter barrysum at bigpond.net.au
Fri Mar 9 01:32:17 CST 2012


I've got 
M:\Inetpub\wwwroot\LiceCodeServer\drivers\dbvalentina4.dll
M:\Inetpub\wwwroot\LiceCodeServer\externals\v4rev.dll

I've updated Mikes script to include the script from ExampleTools.rev


Results:
3/9/12
6:20 PM
Finished: valentina_initclient
Finished: showError
the gClient of this stack is true ----------
Finished: VConnection_Constructor
Finished: VConnection_Constructor - mConn:14164448
HTTP/1.1 502 Gateway Error Server: Microsoft-IIS/5.1 Date: Fri, 09 Mar 2012
07:25:57 GMT Connection: close Content-Length: 186 Content-Type: text/html
CGI Timeout
The specified CGI application exceeded the allowed time for processing. The
server has deleted the process.

Script:
<?lc

local mDatabase,mConn,PathField,DbNameField,IsOpenField
global gConnection
global gSSLEnable


put the Date
Put "<br>"

put the Time
Put "<br>"

   -- since opencard and closecard don't really apply 
   -- I just removed their contents and put them in order here. 
   -- Opencard first
   -- closecard second. 
   -- Also have a 'put' to watch the values of mDatabase and mConn

   put "" into PathField
   put "" into DbNameField
   put "" into IsOpenField
   
   get InitValentina() 

   get valentina_initclient()
   put "Finished: valentina_initclient<br>"

   get showError()
   put "Finished: showError<br>"
   databasecreate
   put "Finished: databasecreate<br>"
   put "mDatabase: " & mDatabase && "mConn:" & mConn & "<br>"
   put "Finished: mDatabase <br>"
   databaseClose
   put "Finished: databaseClose<br>"
   get valentina_shutdown	
   put it && the result & "<br>"               -- should say
"valentina_shutdown 0" if there were no errors on shutdown.
   put "Finished: valentina_shutdown<br>"


-- this is ALMOST verbatim from the example. Default uname and password used
-- put the handlers other than opencard and close card first so that they're
resident when needed

on DatabaseCreate
if the gClient of this stack is true then
	put "the gClient of this stack is true ---------- <br>"

    put VConnection_Constructor( "localhost", "sa", "sa") into mConn
       put "Finished: VConnection_Constructor<br>"

      put "Finished: VConnection_Constructor - mConn:"  & mConn & "<br>"

    get VConnection_Open( mConn )    --                  ============>>>>
times out here
   put "Finished: VConnection_Open<br>"
   get ShowError()
   put "Finished: ShowError<br>"
    put VDatabase_Constructor( mConn ) into mDatabase
   put "Finished: VDatabase_Constructor<br>"
  else
    put VDatabase_Constructor() into mDatabase
  end if
  
  get VDatabase_Open( mDatabase, "database1" )
   get ShowError()
  if VDatabase_ErrNumber( mDatabase ) is not "0" then
    if VDatabase_ErrNumber( mDatabase ) is not "532480" then 
      get VDatabase_Create( mDatabase, "Database1", "kDscDatBlbInd" )
      get showError()
      CreateStructure
    else
      answer VDatabase_ErrString( mDatabase )
      close the defaultStack
    end if
  end if
   
  put VDatabase_Table( mDatabase, "Person" ) into mPerson
  put VTable_Field( mPerson, "FirstName" )  into mFirstName
  put VTable_Field( mPerson, "LastName" )  into mLastName
  put VTable_Field( mPerson, "BirthDate" )  into mBirthDate

end DatabaseCreate

on DatabaseClose
    get VDatabase_Close( mDatabase )
    put VDatabase_Destructor( mDatabase ) into mDatabase
end DatabaseClose

on CreateStructure
   put VDatabase_CreateTable(mDatabase, "Person") into pTable
   
   get VTable_CreateVarcharField( pTable, "Name", 1022, "fIndexed" )
   get VTable_CreateVarcharField( pTable, "LName", 1022, "fIndexed" )
   get VTable_CreateDateField( pTable, "BirthDate", "fIndexed" )
end CreateStructure

function ShowError
  put Valentina_ErrNumber() into errCode
  put Valentina_ErrString() into errString
  
  if errCode <> 0 then 
    show message box
    put errString into message
  end if
end ShowError


function InitValentina
   
   set the gClient of this stack to true  -- YOU NEED TO MODIFY THIS TO TRUE
FOR CLIENT-SERVER mode of examples.
      
   put false into gConnection
   put false into gSSLEnable
   
   if the gClient of this stack is true then
      if the gLocalOnly of this stack is true then
         put false into Valentina_Example_Launched
         answer error "This stack works in local mode only."
         close this stack
      else
         get Valentina_InitClient()
         set the mPath of this stack to the short name of this stack &".vdb"
      end if
   else
      get Valentina_Init( 8 * 1024 * 1024 )
   end if
   get Valentina_DebugLevel("kLogParams")  
end InitValentina


function ShutdownValentina
   if the gClient of this stack is true then
      if the gConnection of this stack is not false then
         get gConnection.Close()
      end if
      get Valentina_ShutdownClient()
   else
      get Valentina_Shutdown()
   end if   
end ShutdownValentina


function MakeNewDatabase
   if the gClient of this stack is true then   
      if the gSSLEnable of this stack is true then
         put VConnection_Constructor("localhost", "sa", "sa", 15432) into
gConnection
         get VConnection_UseSSL( gConnection )
      else
         put VConnection_Constructor("localhost", "sa", "sa") into
gConnection
      end if
      
      get VConnection_Open( gConnection )
      return VDatabase_Constructor( gConnection )
   else
      return VDatabase_Constructor()
   end if
end MakeNewDatabase


function GetPath
   get the effective filename of this stack
   set the itemDel to slash
   set the rootFolderPath of this stack to (item 1 to -2 of it) & slash
   put the rootFolderPath of this stack into path
   
   if the gClient of this stack is true then
      set the path of this stack to ""
   end if
   
   return path
end GetPath


?>

-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of
valentina-request at lists.macserve.net
Sent: Friday, 9 March 2012 1:08 PM
To: valentina at lists.macserve.net
Subject: Valentina Digest, Vol 111, Issue 12

Send Valentina mailing list submissions to
	valentina at lists.macserve.net

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.macserve.net/mailman/listinfo/valentina
or, via email, send a message with subject or body 'help' to
	valentina-request at lists.macserve.net

You can reach the person managing the list at
	valentina-owner at lists.macserve.net

When replying, please edit your Subject line so it is more specific than
"Re: Contents of Valentina digest..."


Today's Topics:

   1. Re: v4rev adk help, can't open a new database (from the
      beginning	lesson example) (Mike Bonner)
   2. Re: v4rev adk help, can't open a new database (from the
      beginning	lesson example) (Mike Bonner)
   3. Re: Shocked to find can't init valentina with LiveCode
      (Mike Bonner)
   4. Re: v4rev adk help, can't open a new database (from the
      beginning	lesson example) (Mike Bonner)


----------------------------------------------------------------------

Message: 1
Date: Thu, 8 Mar 2012 16:25:19 -0700
From: Mike Bonner <bonnmike at gmail.com>
To: Valentina Developers <valentina at lists.macserve.net>
Subject: Re: v4rev adk help, can't open a new database (from the
	beginning	lesson example)
Message-ID:
	<CAG1cpSrN6oZCdgLLtgugCMmejuH9EAcaG4XJO0CvY=rtAcZ1Bg at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hmm ok Just looked at it and the database create IS there. Sec and i'll go
through it again (copy and paste method) and see if I can get it to fail
still.

Ah hah. K.

There is something going wrong with this section here.

get VDatabase_Open( mDatabase, dbPath )
   get ShowError()  --As expected this says file does not exist.
   get VDatabase_DateFormat( mDatabase, "kYMD" )
   get VDatabase_DateSep( mDatabase, "-" )

   put vDatabase_ErrNumber(mDatabase) after msg
-- added this to check the value, It IS 0 so the create never fires
-- Should the date format and date sep not be set until the end?
-- either way, the db doesn't exist and is no created, because the if
condition is not met.
   if VDatabase_ErrNumber(mDatabase) is not "0" then
      get VDatabase_Create( mDatabase, dbPath, "kDscDatBlbInd" )
      get ShowError()
      get VDatabase_DateFormat( mDatabase, "kYMD" )
      get VDatabase_DateSep( mDatabase, "-" )
      createstructure



On Thu, Mar 8, 2012 at 2:02 PM, Ruslan Zasukhin <
ruslan_zasukhin at valentina-db.com> wrote:

> On 3/8/12 3:30 PM, "Mike Bonner" <bonnmike at gmail.com> wrote:
>
> Hi Mike,
>
> > Yep, sorry for bothering you. I was going through the stuff on the 
> > wiki
> and
> > they just don't work as written, but then someone else pointed out 
> > all
> the
> > example stacks in the v4rev example folders and viola' Working 
> > examples
> so I
> > could get a handle on things.
>
> Please point me what exactly from WIKI did not work ?
>
> Tutorial ?
>   we have couple for V4REV I think ...
>
> Else?
>
> Please while you have it in memory yet, what was wrong?
>
>
> > No more wiki for me, don't know why I never discovered the example 
> > stacks before this.  They work great.
>
> This is good.
>
> In WIKI exists also Example Guide for V4REV, Some ideas are described
>
> Gclient flag is important in examples ...
>
> <
> http://www.valentina-db.com/dokuwiki/doku.php?id=valentina:products:ad
> k:exa
> mples:guide:v4rev:v4rev>
>
>
> --
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.macserve.net/pipermail/valentina/attachments/20120308/b95371a7
/attachment-0001.html>

------------------------------

Message: 2
Date: Thu, 8 Mar 2012 16:25:47 -0700
From: Mike Bonner <bonnmike at gmail.com>
To: Valentina Developers <valentina at lists.macserve.net>
Subject: Re: v4rev adk help, can't open a new database (from the
	beginning	lesson example)
Message-ID:
	<CAG1cpSrGYF3qk4aZ0OBM57D3CabA8QLtvkH8TBpuSamLi8nq+g at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Oh, of course I added in the error check handler from part 2 and used it
here to get the "file does not exist" error to display.

On Thu, Mar 8, 2012 at 4:25 PM, Mike Bonner <bonnmike at gmail.com> wrote:

> Hmm ok Just looked at it and the database create IS there. Sec and 
> i'll go through it again (copy and paste method) and see if I can get 
> it to fail still.
>
> Ah hah. K.
>
> There is something going wrong with this section here.
>
> get VDatabase_Open( mDatabase, dbPath )
>    get ShowError()  --As expected this says file does not exist.
>    get VDatabase_DateFormat( mDatabase, "kYMD" )
>    get VDatabase_DateSep( mDatabase, "-" )
>
>    put vDatabase_ErrNumber(mDatabase) after msg
> -- added this to check the value, It IS 0 so the create never fires
> -- Should the date format and date sep not be set until the end?
> -- either way, the db doesn't exist and is no created, because the if 
> condition is not met.
>    if VDatabase_ErrNumber(mDatabase) is not "0" then
>       get VDatabase_Create( mDatabase, dbPath, "kDscDatBlbInd" )
>       get ShowError()
>       get VDatabase_DateFormat( mDatabase, "kYMD" )
>       get VDatabase_DateSep( mDatabase, "-" )
>       createstructure
>
>
>
> On Thu, Mar 8, 2012 at 2:02 PM, Ruslan Zasukhin < 
> ruslan_zasukhin at valentina-db.com> wrote:
>
>> On 3/8/12 3:30 PM, "Mike Bonner" <bonnmike at gmail.com> wrote:
>>
>> Hi Mike,
>>
>> > Yep, sorry for bothering you. I was going through the stuff on the 
>> > wiki
>> and
>> > they just don't work as written, but then someone else pointed out 
>> > all
>> the
>> > example stacks in the v4rev example folders and viola' Working 
>> > examples
>> so I
>> > could get a handle on things.
>>
>> Please point me what exactly from WIKI did not work ?
>>
>> Tutorial ?
>>   we have couple for V4REV I think ...
>>
>> Else?
>>
>> Please while you have it in memory yet, what was wrong?
>>
>>
>> > No more wiki for me, don't know why I never discovered the example
>> stacks
>> > before this.  They work great.
>>
>> This is good.
>>
>> In WIKI exists also Example Guide for V4REV, Some ideas are described
>>
>> Gclient flag is important in examples ...
>>
>> <
>> http://www.valentina-db.com/dokuwiki/doku.php?id=valentina:products:a
>> dk:exa 
>> mples:guide:v4rev:v4rev<http://www.valentina-db.com/dokuwiki/doku.php
>> ?id=valentina:products:adk:examples:guide:v4rev:v4rev>
>> >
>>
>>
>> --
>> Best regards,
>>
>> Ruslan Zasukhin
>> VP Engineering and New Technology
>> Paradigma Software, Inc
>>
>> Valentina - Joining Worlds of Information 
>> http://www.paradigmasoft.com
>>
>> [I feel the need: the need for speed]
>>
>>
>> _______________________________________________
>> Valentina mailing list
>> Valentina at lists.macserve.net
>> http://lists.macserve.net/mailman/listinfo/valentina
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.macserve.net/pipermail/valentina/attachments/20120308/836860fa
/attachment-0001.html>

------------------------------

Message: 3
Date: Thu, 8 Mar 2012 16:28:38 -0700
From: Mike Bonner <bonnmike at gmail.com>
To: Valentina Developers <valentina at lists.macserve.net>
Subject: Re: Shocked to find can't init valentina with LiveCode
Message-ID:
	<CAG1cpSp7t+KxPBUmmc668q4Ecv1MHLH0r19UNHGzp27-q9FJ9w at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Ok wow. LOTS of stuff in these threads.

A) Barry, I am sturgis.

B) Um.. Yes, it is the tutorials (the basic 2 part) that have the issue.  I
finally just copied and pasted for the first part and still couldn't get it
to work. Looks like the database open is tried, but when it fails due to the
db not already existing there is no fallover to create db.  I finally groked
this problem by just skipping over part 1 right to part 2 despite having
never made part 1 work and bam.  Part 2 DOES cover this eventuality so I
could see what was up. Also thanks to you pointing it out of course, and
being pointed at the examples.

C) I suspect the reason I didn't find the great (and working) examples way
back when is because I was on a health problem flare up and I don't
think/read/whatever even remotely close to an acceptable level.  Entirely my
fault, and when in that mode stubborn comes into play so once I found the
wiki I wanted to make it work no matter what!

I'm sure theres d -- x also but I'm one tired puppy so gonna hit the sack
for a while. Thanks very much for all the help in getting my head FINALLY
around the first steps of getting this all to work. Much appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.macserve.net/pipermail/valentina/attachments/20120308/56ec49ea
/attachment-0001.html>

------------------------------

Message: 4
Date: Thu, 8 Mar 2012 19:07:33 -0700
From: Mike Bonner <bonnmike at gmail.com>
To: Valentina Developers <valentina at lists.macserve.net>
Subject: Re: v4rev adk help, can't open a new database (from the
	beginning	lesson example)
Message-ID:
	<CAG1cpSpY3as6qSFh8p4z+ght7X+YZuRyZOz_VpZ+G5gWbZdjzw at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

The problem is here.
http://www.valentina-db.com/dokuwiki/doku.php?id=valentina:products:adk:v4re
v:tutorial:lesson1
in the section specified in the earlier email.

On Thu, Mar 8, 2012 at 4:25 PM, Mike Bonner <bonnmike at gmail.com> wrote:

> Oh, of course I added in the error check handler from part 2 and used 
> it here to get the "file does not exist" error to display.
>
>
> On Thu, Mar 8, 2012 at 4:25 PM, Mike Bonner <bonnmike at gmail.com> wrote:
>
>> Hmm ok Just looked at it and the database create IS there. Sec and 
>> i'll go through it again (copy and paste method) and see if I can get 
>> it to fail still.
>>
>> Ah hah. K.
>>
>> There is something going wrong with this section here.
>>
>> get VDatabase_Open( mDatabase, dbPath )
>>    get ShowError()  --As expected this says file does not exist.
>>    get VDatabase_DateFormat( mDatabase, "kYMD" )
>>    get VDatabase_DateSep( mDatabase, "-" )
>>
>>    put vDatabase_ErrNumber(mDatabase) after msg
>> -- added this to check the value, It IS 0 so the create never fires
>> -- Should the date format and date sep not be set until the end?
>> -- either way, the db doesn't exist and is no created, because the if 
>> condition is not met.
>>    if VDatabase_ErrNumber(mDatabase) is not "0" then
>>       get VDatabase_Create( mDatabase, dbPath, "kDscDatBlbInd" )
>>       get ShowError()
>>       get VDatabase_DateFormat( mDatabase, "kYMD" )
>>       get VDatabase_DateSep( mDatabase, "-" )
>>       createstructure
>>
>>
>>
>> On Thu, Mar 8, 2012 at 2:02 PM, Ruslan Zasukhin < 
>> ruslan_zasukhin at valentina-db.com> wrote:
>>
>>> On 3/8/12 3:30 PM, "Mike Bonner" <bonnmike at gmail.com> wrote:
>>>
>>> Hi Mike,
>>>
>>> > Yep, sorry for bothering you. I was going through the stuff on the
>>> wiki and
>>> > they just don't work as written, but then someone else pointed out 
>>> > all
>>> the
>>> > example stacks in the v4rev example folders and viola' Working
>>> examples so I
>>> > could get a handle on things.
>>>
>>> Please point me what exactly from WIKI did not work ?
>>>
>>> Tutorial ?
>>>   we have couple for V4REV I think ...
>>>
>>> Else?
>>>
>>> Please while you have it in memory yet, what was wrong?
>>>
>>>
>>> > No more wiki for me, don't know why I never discovered the example
>>> stacks
>>> > before this.  They work great.
>>>
>>> This is good.
>>>
>>> In WIKI exists also Example Guide for V4REV, Some ideas are 
>>> described
>>>
>>> Gclient flag is important in examples ...
>>>
>>> <
>>> http://www.valentina-db.com/dokuwiki/doku.php?id=valentina:products:
>>> adk:exa 
>>> mples:guide:v4rev:v4rev<http://www.valentina-db.com/dokuwiki/doku.ph
>>> p?id=valentina:products:adk:examples:guide:v4rev:v4rev>
>>> >
>>>
>>>
>>> --
>>> Best regards,
>>>
>>> Ruslan Zasukhin
>>> VP Engineering and New Technology
>>> Paradigma Software, Inc
>>>
>>> Valentina - Joining Worlds of Information 
>>> http://www.paradigmasoft.com
>>>
>>> [I feel the need: the need for speed]
>>>
>>>
>>> _______________________________________________
>>> Valentina mailing list
>>> Valentina at lists.macserve.net
>>> http://lists.macserve.net/mailman/listinfo/valentina
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.macserve.net/pipermail/valentina/attachments/20120308/5137d918
/attachment.html>

------------------------------

_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina


End of Valentina Digest, Vol 111, Issue 12
******************************************



More information about the Valentina mailing list