|
-
Mar 31st, 2006, 11:21 AM
#1
Thread Starter
New Member
ADOX doesn't see stored procedure
I have discovered that the ADOX catalog does not seem to see more than 30 stored procedures.
Is this a known limit?
I get the error:
'ADO could not find the object in the collection corresponding to the name or ordinal reference requested by the application. '
but the procedure is definitely in the database.
If I iterate through the procedure items using the for each next construct it only displays 30 procs, but there are actually 36.
Access 2000 database VB6 using the ADO data access methods.
Uwe
-
Mar 31st, 2006, 11:44 AM
#2
Re: ADOX doesn't see stored procedure
An Access Query will either be in the ADOX Procedures or ADOX View collections, depending on Query's design.
A query that references a form control will be considered a Procedure.
-
Mar 31st, 2006, 01:36 PM
#3
Thread Starter
New Member
Re: ADOX doesn't see stored procedure
Thanks, your views answer helped.
If I run the query in access the query returns 137 records.
If I execute it from VB I get zero records returned.
I tried the SQL statement pasted from Access:
"SELECT [Bill Items].[Pet ID], [Bill Items].[Invoice #] FROM [Bill Items] WHERE ((([Bill Items].Code) Like ""HSP*"")) GROUP BY [Bill Items].[Pet ID], [Bill Items].[Invoice #] HAVING ((([Bill Items].[Pet ID])<>0)) ORDER BY [Bill Items].[Pet ID], [Bill Items].[Invoice #];"
and I still do not get any records selected.
-
Mar 31st, 2006, 02:31 PM
#4
Re: ADOX doesn't see stored procedure
Try changing HSP* to HSP%
-
Mar 31st, 2006, 05:29 PM
#5
Thread Starter
New Member
Re: ADOX doesn't see stored procedure
I tried that and Access doesn't return any records with HSP% and neither does the code.
-
Mar 31st, 2006, 06:17 PM
#6
Re: ADOX doesn't see stored procedure
-
Mar 31st, 2006, 08:47 PM
#7
Thread Starter
New Member
Re: ADOX doesn't see stored procedure
I discovered the problem.
The command processor extracts the SQL string from the stored procedure and executes that select.
There is obviously a bug when you use the LIKE operator because I changed the WHERE to create a column using LEFT() and compared it to HSP and everything started to work.
I suspect that the LIKE "HSP*" ends up in the SQL string and is comparing the the value including the quotes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|