Hiran de Silva
UltraDev Cookbook

Troubleshooting Tips

1 I get an Error with Netscape
Check that your login form's Action is not empty. You can set it to link back to the login page. Thanks to Joseph Lowery. Or put a # in the box - an inspired suggestion from UltraKev. These two guys should meet.
2 The login page doesn't load. I go straight to Register page
Aha! This happens when the variable in the If statement is misspelt. Note that MM adds 2 underscores to its derived variable names.
3 Initialize a session variable
Mike Barbarelli . m a c r o m e d i a . Technical Support

Hiran - In your login tutorial you mention, "UltraDev gives us an easy way to create Session Variables - Data Bindings tab and click the + sign. However, (unless someone can show me differently) we will need to type a few lines of code anyway. "
You're right - there is no way to initialize a session variable through the data bindings inspector. Presently, you must manually code the initialization statement.

Regards,

Mike Barbarelli
m a c r o m e d i a
Technical Support

4 Fields in the example database
Thanks to Brian Hogue
If you're wondering where the 'AccessGroup' data we stuffed into a Session Variable comes from - it is a field in the Members.mdb database used in the demo.
5 LoginOK.asp and Register.asp pages
For the purpose of the Login demo and tutorial these pages don't actually do anything. So I haven't shown you how to create them. Check out Securing Individual Pages however where some cool things happen.
4 Login tutorial and SQL Server 7.0
  Mark Anderson

Hiran, I tested your login tutorial with both SQL and Access ..... It works with Access but in SQL it fails at the part where you set the "AccessGroup".

I have found a solution, instead of these lines :
Session("svUserID") = (rsLogin.Fields.Item("UserID").Value)
Session("svPassword") = (rsLogin.Fields.Item("Password").Value)
Session("svAccessGroup") = (rsLogin.Fields.Item("AccessGroup").Value)

to:
Session("svUserID") = (rsLogin.Fields("UserID").Value)
Session("svPassword") = (rsLogin.Fields("Password").Value)
Session("svAccessGroup") = (rsLogin.Fields("AccessGroup").Value)

Apparently SQL7.0 doesn't like the 'Item' property. Perhaps you can do some more testing to see if what I did is corect ? It seems to work for me , but I'd hate for you to update your site with incorrect info. For test purposes I was using WINNT 4.0 SP5 IIS4 MSSQL7.0 all on the same SERVER and I used my Win98se PC for the development and testing. BTW I was the one that posted about 5 days ago with my code ... this is the solution I came up with. Feel free to e-mail me back .... I love talking tech stuff :) Mark Anderson System Administrator PromoWorks L.L.C.
manderson@promoworks.org

   
5 Login tutorial - where to insert the code
Brian Hogue
When first discuss adding VBScript, you say "Insert the following lines of code at the end of the UltraDev generated code" To me that is at the after the ending HTML tag. Fortunately, your later example had enough code to show me what you meant.
   
   
   
   
  More answers to life's challenges
   
   

Back to Home
Read Reviews
Write a review on these Tutorials