NetTalk Central

Author Topic: validate login from data in a file  (Read 4457 times)

dbourrut

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • Email
validate login from data in a file
« on: August 17, 2007, 12:30:41 PM »
I want to do what would be typical in a non-NetTalk Webserver app. So, using example app4, I've added a file (TTUSER) to the dictionary and populated the file with two records.

In the ValidateUpdate 2 End where the example says login checking code should go I have this:
    access:ttuser.open
    TTU:UserId=upper(p_web.getsessionvalue('loc_login'))
    case access:ttuser.fetch(TTU:kUserID)
    of level:notify orof level:fatal
      .
      .
      .
   else

It always takes the "of level:notify orof level:fatal" path regardless of the fact that I'm using a valid lookup value.

Suggestions? Perhaps I don't understand what is required to do what I want to do.

Drew

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: validate login from data in a file
« Reply #1 on: August 19, 2007, 05:38:01 AM »
Hi Drew,

After calling
Access:TTuser.Open()
you must call
Access:TTUser.UseFile()

Also don't forget to call
Access:TTUSER.Close()
at the end.

Cheers
Bruce