There is another issue. in the sql statement above line 318 around line 289, the Select statement calls fields from 2 tables. tblTopic & tblEmailNotify as below.
strSQL = "SELECT " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Topic.Subject, " & strDbTable & "Topic.Last_entry_date, " & strDbTable & "EmailNotify.Topic_ID, " & strDbTable & "EmailNotify.Watch_ID "
strSQL = strSQL & "FROM " & strDbTable & "Topic, " & strDbTable & "EmailNotify "
strSQL = strSQL & "WHERE " & strDbTable & "Topic.Topic_ID=" & strDbTable & "EmailNotify.Topic_ID AND " & strDbTable & "EmailNotify.Author_ID=" & lngEmailUserID & " "
strSQL = strSQL & "ORDER BY " & strDbTable & "Topic.Last_entry_date DESC;"
I'm not running MSSQL Server so I dont know how it behaves with it, but if you are using Access you will have a problem. As you see from the red color fields we are trying to get 2 fields with the same name from 2 different tables. That will generate an error with asp/access. What I did to get it to work was simply to change
"EmailNotify.Topic_ID, " to "EmailNotify.Topic_ID As eTopic_ID, "
That will give the fields 2 distinctive names. And you wont have any ambiguity in the call.
Note: If you were to run the query from access and not asp, it will also work as is and you dont need to change it. But with ASP calling access you will get that error.
Edited by fireau