PLEASE REPORT: on testing of Server once again!

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Apr 30 23:17:20 CDT 2003


on 4/30/03 6:49 PM, Keith DeLong at delong at redcort.com wrote:

>> Now I know where to search.
>> Deal is that we use GUSI library that emulate UNIX socket for Carbon and
>> Classic targets. As you know MacOS Classic and Carbon do not have sockets.
>> So problem is located somewhere on this library calls.
> 
> So maybe there are some tests we could have on the client side for valid
> connections.

Agree.
Must exists some errors code that answer for this.

> How difficult would it be to add a server object and test for valid
> connection to vserver and possibly a test for availability of a particular
> database? I'd really like to have something like the following client syntax
> available:
>        
>  
>      //Properties
>      str = server.host
>      str = server.name
>      str = server.user
>      str = server.password
> 
>      //Methods
>      bool = server.available  // can we make a connection?
>      bool = server.dbexists (dbname)
>      bool = server.userexists (username)
>      bool = server.adduser (username, userpassword, adminpassword)
>      bool = server.deleteuser (username, adminpassword)
>      bool = server.addDB (dbname, adminpassword)
>      bool = server.deleteDB (dbname, adminpassword)

VERY GOOD IDEA !!!!!!!!!!!!!!

Keith you are invaluable for us!  :-)
Up to know we was going do this only via Valentina Studio GUI.

Igor, we have more work :-)

Keith,

1) I think we do not need server.AddDB. We can do this via db.Create()

    and probably deleteDB() also not needed if ad SQL command
    SqlExecute( "DELETE DATABASE name" )

2) AddUser, and DeleteUser() -- good idea.
3) server.available -- agree
4) server.dbexists (dbname) --


>      //syntax
>      dim server as vserver
>      server = new vserver(hostname, servername, user, password)

They often name this as Connection class.

>      mDataBase = new MyDataBase(server)

Here I am not agree.
Why to more user/password from Vdatabase object?
Although server really must have user/pass parameters, because only
administrator must be able add/delete users and other commands.

>      res = mDataBase.Create(dbname, 1, 32 * 1024 )
>      //or
>      res = mDataBase.open( dbname )
> 
> 
>      mDataBase2 = new MyDataBase2(server)

And here can be problem.

Look. Some User with some password can have right to access DatabaseA on
server. But this DO NOT means that he must be able access all other
databases on this server.

So combination  { Database / User / Password } must be unique.

>      // copy newdb to server folder
>      res = server.addDB (newdb, sa)
>      if server.dbexists (dbname) then
>           //success
>      else
>           //error
>      end
> 
>      // add newuser to master.vdb
>      res = server.addUser (newuser, newpassword, sa)
>      if server.userexists (username) then
>           //success
>      else
>           //error
>      end

Okay, let's we start implement this dieas step by step, and later polish
them.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list