View Single Post
  #2 (permalink)  
Old April 1st, 2009, 01:09 PM
dparsons dparsons is offline
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

O.o Ok. Lots of problems here. First, for everything from your declaration of objRS to cmd.ExecuteNonQuery() go here about 3/4ths of the way down: http://www.15seconds.com/issue/000810.htm

Also you are referring to the same thing by 2 different names. You call objConn.Open then call cn.Open a little while later. Obviously only one of the objects refer to a connection and you only need ot open it once.

Second, since ASP is a weak typed language it has no support for string, int, double, etc during the declaration of the variable and, as such, all variables are defined as variants. So instead of Dim strUser as String you should only do Dim strUser.

ASP does not have a built-in membership/role provider so the call to Roles.IsUserInRole will need to be removed and you will have to write your own method to make this determination.

Lastly, you do not have access to TextBoxes like objects in classic asp. To set the focus of the textbox you are going to need to emit some javascript to achieve the desired result.

hth.
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
Reply With Quote
The Following User Says Thank You to dparsons For This Useful Post:
GailCG (April 1st, 2009)