List:General Discussion« Previous MessageNext Message »
From:Reuben Patterson Date:May 28 2003 12:17am
Subject:AuthentiX/MySQL/ASP Question
View as plain text  
I'm having trouble pulling a response.redirect to an IP located in a Group table. The user
logs in ok, the currentUser variable is dim'ed and stores the data fine.

The problem is matching the currentUser to the user.username stored in MySQL, and
redirecting to the associated IP from the Group table. Here's what I have, although
nothing I do seems to avoid the "expected ')' " or "syntax error" messages.

dim currentUser %>
<% currentUser = AuthX.CurrentUserName(Request.ServerVariables("LOCAL_ADDR"),
Request.ServerVariables("SCRIPT_NAME"), Request.ServerVariables("HTTP_AUTHORIZATION"))
 
If (1) Then
 
    Set MyConn = Server.CreateObject("ADODB.connection")
dbname=("/dbs/test/test.mdb")
MyConnect="DRIVER={MySql};PROVIDER={mysqld-4.0.12-nt};"
MyConnect=MyConnect & server.mappath(dbname)& ";"
MyConn.Open "DSN=local"

set rstemp = MyConn.execute("SELECT group.hostip FROM test.group, test.user WHERE
group.grouid = user.groupid AND (user.username = "currentUser")")
 
response.Redirect(<i> rstemp </i>)
 
Else     response.Write("failed")
response.End
End If %>


I'm new at this, so please be kind in your helpful suggestions.

Thanks,
Reuben
Thread
AuthentiX/MySQL/ASP QuestionReuben Patterson28 May