V4REV > VServer connection problem

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Tue Apr 24 05:30:31 CDT 2012


On 4/20/12 8:46 PM, "Marek Niesiobedzki" <nm at studionm.pl> wrote:

> I'm trying to connect to VServer Office from LiveCode over LAN (doesn't matter
> if using my own test stack or Valentina examples "vserver.rev"):
> 
>   put VConnection_Constructor( "192.168.1.20", "sa", "sa", "15432") into mConn
> 
> i'm getting mConn = 18727168 (integer value), so it's OK. But then execution
> of:
> 
>   get VConnection_Open( mConn )
> 
> returning  ERROR 0x82503 (error code 533763, error string "Invalid user name
> or password")

Hi Marek,


1) I have to see this error in this vserver example.
After learn, I can say so far fixes needed only V4REV examples.


Each example depends on stack
    Examples/__shared__/ExampleTools.rev

This stack just have few helper functions.

Also it have global gClient flag, which YOU must change to TRUE,
If you want run examples in client/server model


BUT even after I have change it to TRUE,  I see it not works, because
condirion
       if the gClient of this stack is TRUE ..

do not happens ... I have change it to
       if gClient is TRUE ..

Then it start call Valentina_InitClient.


==============================
2) ALSO I was need correct "localhost" to IP of my another LAN computer


* BELOW is this script after my corrections.
 Now with this script example
       SQL_way/Records_AddDeleteUpdate

Works fine ... Other major also


But example vserver.rev  still stops on some line, because
It cannot find some method  OUT()
I think this method should just display answer ...
But it is lost somehow...we will fix this asap also


==============================
3)  TODO -- check RevDB for you ...

4) TODO V4REV to work correctly if both vkernel and vclient are inited.


==============================
global gClient
global gSSLEnable
global gLocalOnly

global gConnection


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


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


function MakeNewDatabase
   if gClient is true then
      if gSSLEnable is true then
         put VConnection_Constructor("192.168.2.22", "sa", "sa", 15434) into
gConnection
         get VConnection_UseSSL( gConnection )
      else
         put VConnection_Constructor("192.168.2.22", "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 gClient is true then
      set the path of this stack to ""
   end if
   
   return path
end GetPath






More information about the Valentina-beta mailing list