Parameterized queries or not?

  • Thread starter Thread starter Chip
  • Start date Start date
C

Chip

Hi,

I am trying to move several field values from one table to
another within my Access DB. I am currently opening a
recordset as the srcObj and another as the targetObj but
the targetObj is using a Command Object and parameters to
create the INSERT statements.

My question is on the Command Obj and Connection Object.
First can I create a CommandObject without a connection?
If not then when creating a connection I don't want to
reference the MDB file as a hard coded path as many of the
examples show for the ConnectionString. Any examples would
be greatly appreciated.
 
You can use
Application.CurrentDb.Name
to get the filename of the open database without hard coding a value in.
Hope this helps.
 

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

Back
Top