[VServer] NT4 error 10093

Erich Geiersberger erichg at mcmm.com
Wed Jan 21 00:52:22 CST 2004


>Erich ,
>
>Please describe in DETAILS STEP BY STEP what you want
>to do with users logins.
>
>Describe your task.
>
>Igor will think and offer you a way.
>Also he can add this way to our tests to make sure it works.
>
>Please describe also why standard way RegisterUser() is not fine for you.
>Okay?

Hi Igor and Ruslan,

I am already using RegisterUser() and it seems to work fine. I only 
access the master database to compare user names and passwords. But 
the problem is somewehere else.


Ok.
My network database is an upgrade from already existing single user 
version of a V12 databse.
Users have settings of their own (printer margins, print layout 
options, email address and others)

These settings need to get splitted in user settings and global 
settings only editable by admin during installation.

So, I have a user database of my own with user names their settings. 
There is also a one record database for the admin with global 
settings for all users.

During installation of the database, existing installations of the 
old program version somewhere in the network can be opened. I extract 
these data and write part of it to the global settings and part of it 
to the user settings for admin.

This works.


On installation of clients, client is asked for user name and password.
He gets added to my user database and gets his own user settings record.

There is also an option for installation of a single place version. 
So all data needed are kept within my own database.
In a single place version the user is admin and has access to both 
global and user settings.
This makes it easy to upgrade a single place to a server version.

Also works.



When a client logs in, there are a number of possibilities and here 
is where the problems start:
I need to know:

- if the datbase is up and running to avoid errors

- name and password
I can check for user name with VServer Xtra, but not for password. So 
I open the master database to compare it in order to give feedback on 
error.

- if user already exists
if not he can register himself as a new user with username and password.

On NT4 we often needed a couple of tries before the user could log in.
So, I checked my login script in authoring mode and found out that:

- Even though I checked for Valentinaerror after opendatabase() there 
was no error when I tried to open the master database on the server 
even though it was not running at all.
Only the baseObjectsToList() method gave an error 5 in this case.

To find out why this happened, I added a function to check for the 
network database before the user logs in. This is the script:

on checkserver
   global ghostname
   cnt = void
   myserver = new(xtra "Vserver", ghostname, myAdmin, myPassword)
   myerror = ValentinaError()
   put "checkserver error" && myerror
   if myerror <> 0 then
     if VErrorHandler(myerror) then
       myserver = void
       return void
     end if
   end if
   OpenSession(myserver)
   myerror = ValentinaError()
   if myerror <> 0 then
     if VErrorHandler(myerror) then
       myserver = void
       return void
     end if
   end if
   cnt = GetConnectionCount(myserver)
   CloseSession(myserver)
   myserver = void
   return cnt
end


And this is what I get in the message window:

gdebugkey = 1
valentinadebuglevel(2,1)
* V4MD *: ValentinaSetDebugMode...done
-- "1 0"
* V4MD *: new VServer...done
* V4MD *: ValentinaError...done
-- "checkserver error 0"
* V4MD *: OpenSession...error 10093
* V4MD *: ValentinaError...error 10093
* V4MD *: VServer_Destroy...done


I also tried it once again directly from the message window:

myserver = new(xtra "Vserver", ghostname, myAdmin, myPassword)
* V4MD *: new VServer...done
put GetVersion(myserver)
* V4MD *: GetVersion...done
-- <Void>

put OpenSession(myserver)
* V4MD *: OpenSession...error 10093
-- <Void>
put GetConnectionCount(myserver)
* V4MD *: GetConnectionCount...done
-- 0
put Available(myserver)
* V4MD *: Available...done
-- 0

The scripts work fine with the same files, the same user names and 
passwords when I run in on a Windows 2000 machine in the same 
network. So this is somehow related to the NT4 workstation (There is 
also a NT4 server running in the same network if this helps you any 
further)

Erich



More information about the Valentina mailing list