im assuming that you are setting the objcmd (not cmd) to nothing in the bolded line below??? if you are setting objcmd to nothing, then you can't possibly execute the insert command.
Code:
'Get next sequencial value from db
sSql = "select max(testimonial_id)+1 as nexval from testimonials"
objcmd.CommandText = sSql
set rs = objcmd.Execute
nexval = rs.Fields("nexval").Value
set cmd = nothing
sSql = "insert into testimonials values(6, 'test6th@home.com', 'test', 0)"
objcmd.Execute
it should be something like this
Code:
'Get next sequencial value from db
sSql = "select max(testimonial_id)+1 as nexval from testimonials"
objcmd.CommandText = sSql
set rs = objcmd.Execute
nexval = rs.Fields("nexval").Value
sSql1 = "insert into testimonials values(6, 'test6th@home.com', 'test', 0)"
objcmd.CommandText = sSql1
objcmd.Execute
set objcmd = nothing