How to search two tables, each on different SQL se

Results 1 to 2 of 2

Thread: How to search two tables, each on different SQL se

  1. #1
    Join Date
    Dec 1969

    Default How to search two tables, each on different SQL se

    Hi,<BR><BR>Usually I can find somecode somewhere that will work but not the case this time. <BR><BR>I have a form which the user provides an email address. The value is then sent to a "validate.asp&#039; page which queries the correct table. <BR><BR>strEmail = Request.form("email")<BR>Set Conn = Server.CreateObject("ADODB.Connection")<BR>Conn.Op en market<BR> strSQL = "SELECT * " _<BR> & "FROM tbl_user " _<BR> & "WHERE email LIKE &#039;%" & Replace(strEmail, "&#039;", "&#039;&#039;") & "%&#039; " <BR> <BR>Set rsUserTable = Conn.Execute(strSQL)<BR><BR> <BR> If rsUserTable.eof then &#039; Check the tbl_user table first if not in Tbl_user send to first error page...End function<BR> Response.Redirect"error.asp?hpmail=" & Request.Form("hpmail")<BR> Response.End<BR>Else<BR> <BR> Response.Redirect"results.asp?hpmail=" & Request.Form("email")&#039;If user doesnt not exist in table then send to results page to finsh registration<BR> Response.End<BR>End If<BR><BR>What I need to do now is use the same Value"email" to search antoher table. This is needed to make sure the user is not already registered. The tricky part is the second table is on another SQL Server.<BR><BR>Any suggestions would be helpful. Thanks, Troy

  2. #2
    Join Date
    Dec 1969

    Default ***CROSS POST*** See Database forum. <eop


Posting Permissions

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