W
Wayne Wengert
I have an aspx page (built in WebMatrix) with the code shown below but when
I run it if gives an error "Expression Expected" pointing to the first DB
call. It is as if the calls to the DB values - "<%#Container..." are not
understood?
This really did run last year (we on on a new ISP now but I don't see that
as causing a problem?)
Any suggestions are most welcome.
============= Code ==================
Function UpdateRecord(e, jn, c)
' e is evaluator NameID
' jn is Judge's Name
' c is caption
Dim strSQL as String
strSQL = "UPDATE judgeevaluations Set scoring = ??, Set dialog = ??" _
& " Where (judgename = '" &
<%#Container.DataItem("JudgeName")%> & "')" _ <=== Error points to here
& " AND (caption = '" & <%#Container.DataItem("caption")%> &
"')" _
& " AND evaluator = " & Session ("EvaluatorID")"
Dim connEval As OleDBConnection
Dim cmdUpdate As OLEDBCommand
connEval = New OleDBConnection( "Server=myServer;
UID=myID;PWD=****;database=DB_12345" )
cmdUpdate = New OleDBCommand(strSQL, connEval)
connEval.Open
cmdUpdate.ExecuteNonQuery
connEval.Close
End Function
I run it if gives an error "Expression Expected" pointing to the first DB
call. It is as if the calls to the DB values - "<%#Container..." are not
understood?
This really did run last year (we on on a new ISP now but I don't see that
as causing a problem?)
Any suggestions are most welcome.
============= Code ==================
Function UpdateRecord(e, jn, c)
' e is evaluator NameID
' jn is Judge's Name
' c is caption
Dim strSQL as String
strSQL = "UPDATE judgeevaluations Set scoring = ??, Set dialog = ??" _
& " Where (judgename = '" &
<%#Container.DataItem("JudgeName")%> & "')" _ <=== Error points to here
& " AND (caption = '" & <%#Container.DataItem("caption")%> &
"')" _
& " AND evaluator = " & Session ("EvaluatorID")"
Dim connEval As OleDBConnection
Dim cmdUpdate As OLEDBCommand
connEval = New OleDBConnection( "Server=myServer;
UID=myID;PWD=****;database=DB_12345" )
cmdUpdate = New OleDBCommand(strSQL, connEval)
connEval.Open
cmdUpdate.ExecuteNonQuery
connEval.Close
End Function