[thelist] Re: Access DB design troubles

Og mindmachine at hotmail.com
Fri Jul 18 19:50:20 CDT 2003

Hi.  Looks like you should be using the value of the recordset instead of
using rsAddUser("FirstName").  My usual reference looks like this:


Give that a shot.  Email me directly if you have any more questions.

Good luck
----- Original Message ----- 
From: <burgan at iprimus.com.au>
To: <thelist at lists.evolt.org>
Sent: Friday, July 18, 2003 12:19 AM
Subject: [thelist] Re: Access DB design troubles

I'm trying to 'print to screen' the name of the users referrer.
Here's how I'm trying to do it - which obviously doesn't work.


  Set adoCon = Server.CreateObject("ADODB.Connection")
  adoCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
  Set rsAddUser = Server.CreateObject("ADODB.Recordset")

  strSQL = "SELECT * FROM Contact WHERE UserID = 2;"

  rsAddUser.CursorType = 2
  rsAddUser.LockType = 3
  rsAddUser.Open strSQL, adoCon

  if NOT rsAddUser("ReferralID") = 0 then
      Response.Write ("Your referrer is:<br>")

      hold_strSQL = strSQL
      strSQL = "SELECT * FROM Contact WHERE UserID = '" &
rsAddUser("ReferralID") & "';"
      Response.Write (strSQL & "<br>")
      Response.Write (rsAddUser("FirstName") & " " & rsAddUser("LastName")
& "<br><br>")

      strSQL = hold_strSQL
      Response.Write (strSQL & "<br>")
      Response.Write (rsAddUser("FirstName") & " " & rsAddUser("LastName")
& "<br><br>")
      Response.Write ("You were not referred to this page")
  end if


I know I'm going wrong but where??


mail2web - Check your email from the web at
http://mail2web.com/ .

* * Please support the community that supports you.  * *

Evolt.org conference in London, July 25-27 2003.  Register today at

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !

More information about the thelist mailing list