Email address as a sessionlevel variable -what

Results 1 to 2 of 2

Thread: Email address as a sessionlevel variable -what

  1. #1
    Join Date
    Dec 1969

    Default Email address as a sessionlevel variable -what

    Hi<BR><BR><BR>I am a very beginner trying to create my own ASP site.My Email Id is Ur assistance will truly be very highly appreciated<BR><BR><BR><BR>I want to use Emailaddress from the form as a session level variable called as "user". This is the program i have written but gives the following error<BR><BR>--------------------<BR>ADODB.Recordset error &#039 800a0bb9&#039 <BR><BR>The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. <BR><BR>/BegASP/identifier.asp, line 12 <BR>----------------------------<BR><BR><BR>the lines are as follows<BR><BR>&#060;HEAD&#062;<BR>&#060;/HEAD&#062;<BR>&#060;BODY&#062;<BR>&#060;%<BR>Dim Identifier<BR>Dim ObjConn<BR>set ObjConn = server.CreateObject("ADODB.Connection")<BR>ObjConn .Open "DSN=NAMA"<BR>set Identifier = Server.CreateObject("ADODB.RecordSet")<BR>Identifi er.Open "Identity", ObjConn,adOpenKeySet, AdLockreadOnly, adCmdTable<BR><BR>identifer.Filter = "Email = &#039 " & Request.Formuser("email") & " &#039 "<BR><BR>if identifier.EOF then<BR>response.write "wrong "<BR>else<BR>Response.Redirect "grocery.asp"<BR>end if<BR><BR><BR>session("user") = Request.FormUser("email") %&#062;<BR>%&#062;<BR>&#060;/BODY&#062;<BR>&#060;HTML&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Email address as a sessionlevel variable -what

    This line:<BR>Identifier.Open "Identity", ObjConn,adOpenKeySet, AdLockreadOnly, adCmdTable<BR><BR>is causing your problem. You have used the constants "adOpenKeySet", "adLockReadOnly" and "adCmdTable" without telling the asp.dll what they mean. You either need to use the actual integer values they represent in your .open statement OR, better yet, include the file since you&#039re using vbscript. If you were using javascript you&#039d include<BR><BR>Add this to the top of your page:<BR><BR>&#060;!-- #include virtual="" --&#062;<BR><BR>Then make sure the file is in the same virtual directory as this page.<BR><BR>If you wanted you could create a virtual directory called something like "include" then the line would be:<BR><BR>&#060;!-- #include virtual="/include/" --&#062;<BR><BR>That way, all the pages on your server could get to that file with the same line regardless of where they were in your directory structure.<BR><BR>Good luck,<BR><BR>Joel<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts