sorry ment use SQL "INSERT INTO "
it would work in both versions.
'Initalise the SQL string with a query to get the email notify topic details
If strDatabaseType = "SQLServer" Then
strSQL = "EXECUTE " &
strDbProc & "TopicEmailNotify @lngAuthorID = " &
lngLoggedInUserID & ", @lngTopicID= " & lngTopicID
Else
strSQL = "SELECT " & strDbTable & "EmailNotify.* "
strSQL = strSQL & "FROM " & strDbTable & "EmailNotify "
strSQL = strSQL & "WHERE "
& strDbTable & "EmailNotify.Author_ID=" & lngLoggedInUserID
& " AND " & strDbTable & "EmailNotify.Topic_ID=" &
lngTopicID & ";"
End If
With rsCommon
'Set the cursor type property of
the record set to Dynamic so we can navigate through the record set
.CursorType = 2
'Set the Lock Type for the
records so that the record set is only locked when it is updated
.LockType = 3
'Query the database
.Open strSQL, adoCon
'Check to see if the user is allowed to view posts in this forum
Call
forumPermisisons(intForumID, intGroupID, intReadPermission, 0, 0, 0, 0,
0, 0, 0, 0, 0)
'If the user can read in this forum the add them
If blnRead Then
'Add new rs
.AddNew
'Create new entry
.Fields("Author_ID") = lngLoggedInUserID
.Fields("Topic_ID") = lngTopicID
'Upade db with new rs
.Update
'Set the return value
strReturnValue = "&EN=TS"
End If
'Clean up
.Close
End With
|
alll you need to do is add this to the section that changes group, use an If groupID = x then
code
end if
all you need to do is specify lngTopicID
also you may want to ad dmultipals of it to allow for extra forums or do a loop