This code should do it. It admits that you're including config.asp and inc_header.asp in the same page where you'll be doing this.
strSql = "SELECT CodeField FROM " & strMemberTablePrefix" & "MEMBERS WHERE " & strMemberTablePrefix & "MEMBER_ID=" & MemberID
set myRs = my_conn.execute(strSql)
if not myRs.EOF then myCodeField = myRs("CodeField")
myRs.Close
set myRs = nothing
When this code completes, MyCodeField will have the desired CodeField value.