Well, I ended up figuring it out. There was an Nz function inside the NextTestLogID query used. Changed it to iif(isNull(x),0,x) and it worked fine.
On Aug 25, 12:15 pm, bismuth83 <[email protected]> wrote: > Using ADO.NET to run an Insert query on an Access database from a web > page. It complains "System.Data.OleDb.OleDbException: Undefined > function 'nz' in expression" when it gets to ExecuteNonQuery(), but > there is no Nz being used. > > Here is the basic code: > strtest = "INSERT INTO Tests_Log ( test_id, log_id, time_duration, > unit_id, log_note ) SELECT Tests.test_id, NextTestLogID.nextlog_id, 10 > AS Duration, 1 AS LogIntervalUnit, "test" AS Comments FROM Tests INNER > JOIN NextTestLogID ON Tests.test_id = NextTestLogID.test_id WHERE > (((Tests.test_id)=10))" > dbcomm = New OleDbCommand(strtest,dbconn) > dbread = dbcomm.ExecuteNonQuery() > > Any suggestions appreciated. Thanks!
