473,783 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 'ProcedureParam ater'". .Net does recognize the stored procedure i.e.
it does appear in the drop-sdown list.

Jun 4 '07 #1
3 1644
Hello,

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

Best regards,
Henning Krause

"mscertifie d" <ru****@tigerli ly.comwrote in message
news:0C******** *************** ***********@mic rosoft.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 'ProcedureParam ater'". .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 tblAddressOnlin e
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

"mscertifie d" <ru****@tigerli ly.comwrote in message
news:0C******** *************** ***********@mic rosoft.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 'ProcedureParam ater'". .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****@tigerli ly.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 tblAddressOnlin e
¤ 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
3235
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 productivity is significant. When I pop TaskManager, it looks like it's only running 10-20% capacity - so I'm guessing the horsepower is there but other apps just aren't getting their shots at the CPU.
1
3427
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; _____________________________________________________ SELECT "criteria"
8
4119
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 stores the quarter name in txtmonthlabel (a date field) and the quarters totals in txtdomic (a number field) EG If the user enters March 2004 they get figures upto March 2004, if they enter June 2004 they get total upto June 2004, in other words...
10
2563
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 the capabilities of what I have available. I can learn the details myself I think. I am trying to set this up to be as simple to use as possible since others will be importing data on a weekly or daily basis. I need to import some text files,...
1
3243
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 converted my dates in serial increments of 6 hours intervals. I verified that these serial dates have the expected values. I run into repeated syntax error in the adapted Query.
1
10823
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 them is to query "qry_last_transition," which is also a parameter query. Both querys use the same parameter: a control called "txtSecondDate" on a pop up form. What I've been trying to do up to this point is to open up this parameter form,...
7
1730
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 working in access 2003 around 8users working in it .i was working with these users in my sharing folder which i know that may corrupt the whole application but from one week i transfer it
8
1525
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())" Dim insCmd As New OleDbCommand(insStr, dbConContacts)
5
3977
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 Date Cumulative Sum Daily Sum DC 03-Apr-07 6 6 DC 04-Apr-07 20 14 DC 05-Apr-07 0 0 DC 06-Apr-07 24 4
9
4023
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 my fields. When I try to run it I get #errors in my RunTot column. I'm kinda new to this. Not sure if maybe I mistyped something wrong or is there a better way to do this? I have pasted the code. Any help would be greatly appreciated....
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10081
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6735
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.