Web Connection
TRIM and GetSessionVar()
Gravatar is a globally recognized avatar based on your email address. TRIM and GetSessionVar()
  Michael Hogan (Ideate Hosting)
  All
  Nov 7, 2018 @ 02:35pm

In WC 5.x

Any idea why TRIM(SESSION.getsessionvar("_brdcode")) would return a blank value, but SESSION.getsessionvar("_brdcode") would return a correct value?

I'm quite sure it used to work properly so it's probably a VFP environment setting...

Gravatar is a globally recognized avatar based on your email address. re: TRIM and GetSessionVar()
  Rick Strahl
  Michael Hogan (Ideate Hosting)
  Nov 7, 2018 @ 02:49pm

That doesn't make any sense. Are you sure you're pasting the right thing here?

Session changed recently to use varchar fields so that may change the behavior of your queries if there are spaces in the table, but based on the code you're showing that should not matter because the TRIM() happens after the value has been returned. Whatever the diff is it's gotta be application specific.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: TRIM and GetSessionVar()
  Michael Hogan (Ideate Hosting)
  Rick Strahl
  Nov 7, 2018 @ 02:51pm

Yes, I agree it doesn't make sense. I'll report back when I find the problem. Thanks for including source...

Gravatar is a globally recognized avatar based on your email address. re: TRIM and GetSessionVar()
  Michael Hogan (Ideate Hosting)
  Rick Strahl
  Nov 7, 2018 @ 03:15pm

Ahhh - seems like it's getting blanked out by wwdropdownlist.text_assign... checking further.

A more accurate line would be THIS.ddbrd.TEXT= TRIM(SESSION.getsessionvar("_brdcode"))

Gravatar is a globally recognized avatar based on your email address. re: TRIM and GetSessionVar()
  Michael Hogan (Ideate Hosting)
  Rick Strahl
  Nov 7, 2018 @ 04:01pm

THIS.ddcol.TEXT= ALLTRIM(SESSION.getsessionvar("_colorcode")) && assigns empty value??? lcTest = TRIM(SESSION.getsessionvar("_colorcode")) && Assigns value of session variable lcTest = SESSION.getsessionvar("_colorcode") && Assigns value of session variable

Are there some object properties or methods of ddcol that I should be checking?

ddcol is a wwwebdropdownlist

Gravatar is a globally recognized avatar based on your email address. re: TRIM and GetSessionVar()
  Rick Strahl
  Michael Hogan (Ideate Hosting)
  Nov 7, 2018 @ 05:02pm

Most likely because Session isn't enabled yet. Check and make sure you do InitSession() in the OnProcessInit() OR make sure that the form calls this.EnableSessionState=.T. before you make the assignment.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: TRIM and GetSessionVar()
  Michael Hogan (Ideate Hosting)
  Rick Strahl
  Nov 8, 2018 @ 08:17am

I obviously don't know enough about these wwwebdropdownlist objects yet... I'll check about the session state, though. Thanks.

© 1996-2018