Database difficulties managing multiple sites

Results 1 to 2 of 2

Thread: Database difficulties managing multiple sites

  1. #1
    Join Date
    Dec 1969

    Default Database difficulties managing multiple sites

    I&#039;m writing a system that authenticates users and acts as an umbrella system to a number of sub systems on different sites. <BR><BR>So when a user logs in the authentication system logs the new user and a token is generated. This is stored in a database table on the authentication database and sent to the user as a session variable. If the user clicks a button to go to a subsystem, the token is passed to the new page (on the new site) in a hidden form control. This is then validated against the authentication database from the subsystem and a session variable created to hold the token on the client. <BR><BR>For some reason rs.recordcount returns -1 so the user isn&#039;t authenticated on the new site. The dsn looks fine and the connection itself doesn&#039;t throw any errors so I&#039;m assuming the connection is happening. If I write the query to the screen and push it straight into a new query in the database it works fine.<BR><BR>Is there anything obvious (or otherwise) that I haven&#039;t considered<BR><BR>Thanks<BR><BR>Ian <BR><BR>The database is Access all the code is standard.. here is the connection etc:<BR><BR>&#039;------------------------------------------------------------------------ Test for validated user <BR> &#039;required for moving between systems<BR>if NOT(request.form("Ref") = "" OR isNull(request.form("Ref"))) then session("SessRef") = request.form("Ref") <BR> &#039;required when working within a subsystem<BR>if isnull(session("SessRef")) or session("SessRef")="" then<BR> Response.Redirect "." &#039;not a valid user<BR>else<BR> &#039;create connection<BR>Set con = Server.CreateObject("ADODB.Connection")<BR>con.Con nectionString = "DSN=OnlineAdmin"<BR>con.Open <BR><BR>&#039;--------------------------------------------------------------------- get user data from database <BR><BR>Set rst = Server.CreateObject("ADODB.Recordset") <BR><BR>sSQL = "SELECT * FROM tblCurrentUser;" &#039;(remarked to simplify query) WHERE token = &#039;" &session("SessRef") &"&#039;;"<BR><BR>rst.Open sSQL, con <BR><BR>&#039; set rst = con.execute(sSQL)<BR>Response.write "<BR>recordCount="&rst.recordcount &#039;not a valid user<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQ, category Databases, Errors

    The link to the ASPFAQs is at the top right corner of most every page on this site, including the one you are reading right now.<BR><BR>Look in that category. This isn&#039;t truly an error, but so many people (like you, but you are in the company of 17,000 others) think it is that Scott decided to put the FAQ in there.<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