NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Niels Larsen on October 17, 2008, 02:03:11 AM
-
Hi
I would like to make my server handle severel datasets, depending on who has loged in.
Any ideas??
Best regards
Niels Larsen
-
Hi Niels,
In one of our web apps, we use tps files with a variable for the file name specified in dictionary.
At login, we assign the users folder and filename to this variable.
All session file operations for this user act on the his dataset
Regards
Graham
-
Hi Niels,
Graham is right.
a) in the dict set the full path name for the file to be a variable
b) In the ProcessLink method, before parent call, set the variable based on a session value.
Cheers
Bruce
-
Sounds easy - I'll try
Thanks!!
-
Hi
I have tryed all example web apps, but can't find the right example. Can one of you help me??
/Niels
-
Hi Niels,
I don't think any of the examples does this, as far as I can recall.
However it's only 2 steps, so if you get stuck just ask.
cheers
Bruce
-
Hi
Next time I also need to understand what you write ;)
I just works great....
Thansk!
/Niels
-
For those interested, we run the web app at different clients on SQL Server. The database names are obviously different at every client, so to connect to the right SQL database we simply use the .ini file (I guess TPS file can also be used) and put the following code in the WebServer proc under Window Manager -> Init -> Restore from INI file.
GLOD:Server = GETINI('connection','server','','.\grailweb.ini') !'grailserver'
GLOD:Database = GETINI('connection','database','','.\grailweb.ini') !'grail_HIU'
GLOD:dbUser = 'USER'
GLOD:dbPass = 'PASSWORD'
GLOD:SQL_Connect = GLOD:Server &','& GLOD:Database &','& GLOD:dbUser &','&GLOD:dbPass
where the INI file looks something like this:
[WebServer]
Maximize=No
Minimize=No
XPos=419
YPos=221
[__Dont_Touch_Me__]
Sectors=0
[connection]
server=grailserver
database=grail_grail
docsign=last
PH=No
Broker=Yes
User=Yes
Claims=Yes
Maybe somebody will find this useful.
Cheers
Charl