473,394 Members | 1,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Running an MS Access query from .NET

Has anyone successfully used an Access query from .NET? I am trying to do
this and am getting a weird error. .NET calls queries 'stored procedures'.
The error I am getting says "Schema could not be retrieved for this stored
procedure' ... "The underlying enumerator did not support enumerating objects
of type 'ProcedureParamater'". .Net does recognize the stored procedure i.e.
it does appear in the drop-sdown list.

Jun 4 '07 #1
3 1608
Hello,

Access does not support stored procedures. What query are you firing against
Access?

Best regards,
Henning Krause

"mscertified" <ru****@tigerlily.comwrote in message
news:0C**********************************@microsof t.com...
Has anyone successfully used an Access query from .NET? I am trying to do
this and am getting a weird error. .NET calls queries 'stored procedures'.
The error I am getting says "Schema could not be retrieved for this stored
procedure' ... "The underlying enumerator did not support enumerating
objects
of type 'ProcedureParamater'". .Net does recognize the stored procedure
i.e.
it does appear in the drop-sdown list.
Jun 4 '07 #2
Thanks for the response.
I'm not actually doing the .Net part, that is another guy but I've been
looking over his shoulder. He is binding a data grid to the data and is using
a 'wizard' (for want of a better term) in Visual Studio. He can specify
either 'tables and views' (which drop-down does NOT list the query) or
'custom stored procedures' which does list the query. As soon as he selects
the query from the drop-down, he gets the error I mentioned. When we cut and
paste the entire text of the query into .NET to run, it runs fine, but I'd
prefer him to be executing the query.
Here is the query:
SELECT FirstName, LastName, Address1, Address2, City, State, ZipCode,
RecordType, HowMany, RecordDate FROM tblAddressOnline
UNION SELECT FirstName, LastName, Address1, Address2, City, State, ZipCode,
RecordType, HowMany, RecordDate FROM tblAddress
ORDER BY LastName, FirstName;

-Dorian
"Henning Krause [MVP - Exchange]" wrote:
Hello,

Access does not support stored procedures. What query are you firing against
Access?

Best regards,
Henning Krause

"mscertified" <ru****@tigerlily.comwrote in message
news:0C**********************************@microsof t.com...
Has anyone successfully used an Access query from .NET? I am trying to do
this and am getting a weird error. .NET calls queries 'stored procedures'.
The error I am getting says "Schema could not be retrieved for this stored
procedure' ... "The underlying enumerator did not support enumerating
objects
of type 'ProcedureParamater'". .Net does recognize the stored procedure
i.e.
it does appear in the drop-sdown list.

Jun 4 '07 #3
On Mon, 4 Jun 2007 13:07:01 -0700, mscertified <ru****@tigerlily.comwrote:

¤ Thanks for the response.
¤ I'm not actually doing the .Net part, that is another guy but I've been
¤ looking over his shoulder. He is binding a data grid to the data and is using
¤ a 'wizard' (for want of a better term) in Visual Studio. He can specify
¤ either 'tables and views' (which drop-down does NOT list the query) or
¤ 'custom stored procedures' which does list the query. As soon as he selects
¤ the query from the drop-down, he gets the error I mentioned. When we cut and
¤ paste the entire text of the query into .NET to run, it runs fine, but I'd
¤ prefer him to be executing the query.
¤ Here is the query:
¤ SELECT FirstName, LastName, Address1, Address2, City, State, ZipCode,
¤ RecordType, HowMany, RecordDate FROM tblAddressOnline
¤ UNION SELECT FirstName, LastName, Address1, Address2, City, State, ZipCode,
¤ RecordType, HowMany, RecordDate FROM tblAddress
¤ ORDER BY LastName, FirstName;
¤

The Designer is not very reliable when it comes to running/testing Jet database engine queries.
However, in most instances you can save the data source and it will run fine during application
execution.
Paul
~~~~
Microsoft MVP (Visual Basic)
Jun 6 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: PeteCresswell | last post by:
Access tends to take over my machine when I run long queries. The queries in question are Append queries. Some of the jobs we're talking about run 45 minutes to an hour...so the loss in...
1
by: Aaron | last post by:
Hello fellow programmers, I am trying to run an append/update query from code, a command button on a form initiates the queries. the format i am using is; ...
8
by: Tony Williams | last post by:
I have a database that hold s figures for each quarter. I want to create a query whereby the user can ask for the running total of the data upto the quarter they enter into a prompt. The database...
10
by: shumaker | last post by:
I don't need a detailed description of a solution(although I wouldn't mind), but I am hoping someone could tell me in general the best path to go about accomplishing a task, since I don't know all...
1
by: u473 | last post by:
I am scratching my head with the required quotes and parentheses. I started with an existing working Query with Running Total by date. Now I need to produce a running total by quarter day, so I...
1
by: jnikle | last post by:
I have a parameter query named "qry_employee_info_reports" that I need to run in the OnOpen event of a form. I'm after its total number of records. The query's got several joins in it, and one of...
7
by: funfair | last post by:
hi,every one im facing a problem in running access it's about 25 tables 80 forms 46 query (5 append query ,1 update query ,2 delete query ) 60 reports 4 modules after 7 months of perfect...
8
by: John | last post by:
Hi I am using the below code to run a sql on an underlying access table; insStr = "INSERT INTO ( Action, , , Request_Date ) " & _ "VALUES (""Modify Client"", 93, ""Administrator"", Now())"...
5
by: mebrabham | last post by:
Hello, I am trying to create a running subtotal in a query and then graph the running subtotal for each city group. The data looks like this in the table (for illustration): My City My...
9
by: JJM0926 | last post by:
I'm trying to create a running totals query in access 97. I have followed the directions on how to do it from Microsofts website article id 138911. I took their code they had and replaced it with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.