1

Topic: Why one requests in DAO work, and ADO are not present?

There was I earlier such problem. Even it seems understood. But here faced again and I can not recall anything "paternal and why".
There is at me in Access storable a request "qry_Erase1"

 DELETE Tb303Ons. 
FROM Tb303Ons
WHERE (((Tb303Ons. ) Like "1 *"))
WITH OWNERACCESS OPTION;

I launch it on performance

CurrentProject. Connection. Execute "qry_Erase1"

No error messages are present, but the data is not deleted.
I launch it on performance

CurrentDb. Execute "qry_Erase1"

the Data is deleted.
What is the matter? Why in one cases requests ADO are fulfilled, and in others - are not present?
Here such construction is fulfilled without problems.

strSQL = "delete from TbOperatory where KodOperatora <>" and intCodOperator
CurrentProject. Connection. Execute strSQL

Or all the matter is that there storable request, and here character string?
There was I this problem in 2003 and 2010 versions. In remaining probably the same the same situation.
-------------------------------------------------------------
And you enclosed already the blood rouble in Bill Gates's 50 milliard state?

2

Re: Why one requests in DAO work, and ADO are not present?

Joss, in ADO the specification of characters of a template of LIKE clause differs from DAO and VBA.
In your case instead of Like "1 * " it is necessary Like "1 % "

3

Re: Why one requests in DAO work, and ADO are not present?

Thanks. All turned out. Never on it would think.