could you post the name of the function in which this code sits?
if the function's called "getMemberID(fUser_Name)" you could try this here:
function getMemberID(fUser_Name)
'## Forum_SQL
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(fUser_Name, "SQLString") & "'"
Set rsGetMemberID = Server.CreateObject("ADODB.Recordset")
rsGetMemberID.open strSql, my_Conn
if not rsGetMemberID.eof then
getMemberID = rsGetMemberID("MEMBER_ID")
else
getMemberID = 0
end if
rsGetMemberID.close
set rsGetMemberID = nothing
end function
if the one you refer to is called "getNewMemberNumber()" you could try this here:
function getNewMemberNumber()
'## Forum_SQL
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(strDBNTUserName, "SQLString") & "'"
Set rsGetMemberID = Server.CreateObject("ADODB.Recordset")
rsGetMemberID.open strSql, my_Conn
if rsGetMemberID.EOF or rsGetMemberID.BOF then
getNewMemberNumber = -1
rsGetMemberID.close
set rsGetMemberID = nothing
exit function
end if
getNewMemberNumber = rsGetMemberID("MEMBER_ID")
rsGetMemberID.close
set rsGetMemberID = nothing
end function
Crash's Site | Crash is from