Running an ADO query in Access 2000 - TechRepublic
General discussion
September 7, 2001 at 03:41 AM
m_ozog

Running an ADO query in Access 2000

by m_ozog . Updated 24 years, 9 months ago

I have been trying to execute an ADO query in my Access 2000 database. The command is supposed to create a table and populate it based on varying criteria. The reason I don’t just use a standard Access query is because the criteria varies but it is in a very similar format. If I capture the command that was executed and put it into a new query it runs fine.

The problem is that the table is made but no data is entered. I have 0 records when there should be 24.

The commands used are:
Set Cmmd = New ADODB.Command
Set Cmmd.ActiveConnection = Cnn
Cmmd.CommandText = strSQL
Cmmd.CommandType = adCmdText
Cmmd.CommandTimeout = 45
Cmmd.Execute

I am new to ADO, so any assistance would be helpful.

This discussion is locked

All Comments