Hi
I've recently started moving from Dao to ADO and have hit a few
problems with creating/deleting stored procedures (in an Access
database).
I've figured out how to create the stored procedures from code using
the ADOX Catalog and Procedures.Append methods and the ADODB
CommandText.
Now I want to be able to delete the stored procedures. I thought I
could do this through the Procedures.Delete(item). Fair enough this
deletes a stored procedure when it exists in the collection, but
something weird is happening. The Procedures collection doesn't contain
a collection of all the procedures I created.
Out of the 8 I create, only 7 are in the collection, concidentally,
it's the first procedure I created that's missing. I rerun the deletion
function again and this time only 6 procedures are in the collection,
again the first one is missing. This ends up with some procedures I
can't delete, and subsequently can't recreate because they already
exist error message is fired back at me.
I'm not cycling through the collection on an index basis, but using
For Each objProcedure in objCatalog.Procedures
'Deletion code
Next
so there's no incorrect indexing being used. Can anyone throw any light
on this?
Thanks
Andrew
Sent via Deja.com http://www.deja.com/
Before you buy.