Hello,
How am I supposed to do this now in version 6?... I am attempting to see if a record exists before I add a new record. Here is the code I have:
strSQLExists = "select * from db_spendingbudget where [SubDepartment]='" & dict("SubDepartment") & "' AND [week] = '" & dict("week") & "'"
set rsExists = CreateObject("ADODB.Recordset")
rsExists.Open strSQLExists, dbConnection
if not rsExists.eof then
response.write "There is already a budget for this subdepartment and week."
BeforeAdd = False
else
BeforeAdd = True
end if
rsExists.Close : set rsExists = Nothing
Is there anything wrong with this code? Maybe in version 6 I'm supposed to use this dal.whatever business... ? (I'm much more comfortable with SQL, but I guess I can learn...). If I am supposed to use dal, what is the syntax for comparing multiple fields?
Also, I've been trying just a simple response.write dict("filedname") to test my stuff and see if I'm going crazy and I can't get anything to display. Has this totally gone away?
Thanks,
Tim