Redirect to IP in table

2003-05-29 Thread Reuben Patterson
Quick, simple question for the masses I'm sure.

I've been having trouble assigning a property to a SELECT statement which
pulls an IP from a table, then redirecting the users browser to that value
stored in rstemp.

<% dim rstemp %>
<% rstemp = MyConn.execute("SELECT group.hostip FROM test.group, test.user
WHERE user.groupid = group.groupid AND user.username=' " & currentUser & " '
")
%>

response.Redirect(rstemp) 'returns Type Mismatch
response.Write(rstemp) 'returns default property not found

Any thoughts on what I'm doing wrong? Any help would be greatly appreciated.

Sincerely,
Reuben



AuthentiX/MySQL/ASP Question

2003-05-27 Thread Reuben Patterson
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( rstemp )
 
Else response.Write("failed")
response.End
End If %>


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

Thanks,
Reuben