Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

About Web.pb

0 views
Skip to first unread message

tone

unread,
Sep 27, 2000, 3:00:00 AM9/27/00
to
Dear sir,
I'm developer of software hourse in thailand.Now i'm using
powerbuilder7.0(Enterprise)
and i'm trying to develop web.pb.I can make function and call it via
browser.It successfully.
But now i have a ploblem below this
1. The database can avilable or stay remain utill i close the browser?
or utill i stop it?
If it can What scritpt or function for it?
Example : If i use uo_test (nonvisual userobject) and it contain
f_display and f_update (function) When i open the browser I go
http://www.powervision.co.th/net/idkdemo/pbcgi70.exe/uo_test/f_display
It display welcome message and submit button when i press the button it go
http://www.powervision.co.th/net/idkdemo/pbcgi70.exe/uo_test/f_update
and it make new connection for database It isn't stay remain
[My connection script is in constructor even of uo_test]

Then it's my problem because I want to set security for my application
I use storeprocedure it can pass argrument to next page and it can check
autorize or not but the database is not stay remain or remain connect and
destroy connection automatically.

How to set up the userobject it can stay remain or keep connection utill i
close it or untill i close browser?

I Hope you to Reply my e-mail.

Regard

@fujisawa.com Pete Byer

unread,
Sep 27, 2000, 3:00:00 AM9/27/00
to
You do not get to "hold" a connection for a particular user. Every request
to your application server makes a new connection to the database. You
can't "hold" a connection for the same reason you can't use global
variables... Application servers are stateless. Every request they receive
is a brand new request (all variables are reset), the server doesn't know
that this is the second or third request by the same user, as a windows
application would.

If you need user specific data (stateful data), you can make use of shared
objects. You can try to "hold" a connection (save the sqlca) in a shared
object, but...
1) I don't think it will work.
2) As a whole, this is not the way the application servers are designed to
work. Try to think of a way to either save the user information that you
need from one request to the next as: a parameter in the url, save the data
in a shared object or save the data in the database.

I have an application that requires logon. I use the users login
information to verify that he/she is a valid user, if they are, I save
pertinant data as a row in a datastore, in a shared object. I always pass
the userid on the url. For every request that comes thru, I use the userid
from the url and do a find in the datastore. If the user is found, I know
they are "logged in" to the system. When you use this type of logic, you
also need to have an automatic timeout. After n hours (or minutes) of
inactivity, remove the user from the datastore in the shared object. If you
dont do this, someone can bookmark a page in your system and avoid logging
in.

Hope this helps,
Pete Byer
--
current email: pete_byer @fujisawa.com
permanent email: pete_byer @byerconsulting.com
http://www.nowalking.com/

"tone" <ads...@hotmail.com> wrote in message
news:dLertrD...@forums.sybase.com...

Anon...@sybase.com

unread,
Oct 1, 2000, 3:00:00 AM10/1/00
to
Hi all,

I have a ploblem about web.pb . I'm try to make listbox for my app.
Example. When I make listbox for year

ls_select_year ="<SELECT NAME=ai_year SIZE=1 >"
ls_oy1="<OPTION VALUE=1999-01-01>1999"
ls_oy2="<OPTION VALUE=2000-01-01>2000"
ls_select_year_close="</SELECT>"

It's ok.But now i need to put current year such as
this year is 2000 the listbox show 2000 if this year is 2001
the listbox show 2001 automatically

If i can pass argument in option value such as OPTION VALUE =
ai_current_year
It's no ploblem but i can't.
Can you tell me how i can make listbox for pass argument ?

2. Can i use The multiple listbox?

Regard


Rob Martin

unread,
Oct 5, 2000, 3:00:00 AM10/5/00
to
Hi

Use the 'selected' argument in the option. As you build each line, check for
current date and add it.

For example;

ls_CurrentYear

ls_CurrentYear = String( Today(), 'yyyy')

ls_html = '<SELECT NAME="ai_year" SIZE=1 >'

for ll_x = 1 to ll_max // loop through your list of years (from
database?)

ls_html += '<option value="' + ls_year[ll_x] + '-01-01"'
if ls_year = ls_CurrentYear THEN ls_html += ' selected '
ls_html += '>' + ls_year[ll_x]

next

ls_html += '</select>

HTH
Rob Martin, Oz.


<Anon...@sybase.com> wrote in message
news:C8D5AF94AADED8EF001D615D8525696B.0019D7C285256967@webforums...

0 new messages