Parameterized query loses first field

E

ExcelMan

I have a parameterized insert query stored in the database which I
execute under ADO from a class module. Problem is, I populate all of
the eight parameters and the query works fine (no errors) except that
the first field in the record I am inserting comes up blank. I've
checked that the parameter is being populated ok, and I've experimented
with different data types on the cmd.CreateParameter method (I've
settled lately on adVariant) but nothing seems to work. I've tried
deleting the first field and running it again, but then what used to be
the second field comes out blank. All other fields get properly
populated.

I'm almost ready to put a dummy field into the table that will never be
populated, but I'd like to actually know what's going on and fix it.

Any ideas?

BTW, the reason I need to use a stored query is that I need to run the
query with OWNERACCESS OPTION. You can't do that with dynamic SQL.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top