Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Jet 4 does not support OleDb.OleDbSchemaGuid.Procedure_Parameters, alternatives to determine parameters of a stored proc in MS-Access?

Posted on 2004-10-29
10
Medium Priority
?
561 Views
Last Modified: 2012-08-13
I am trying to access Database Schema-Information via VB.NET 2003, ADO.NET.
Apparently Jet 4 (as I found described for Jet 3.51 in MS-KB: http://support.microsoft.com/kb/q191356/ ) does not support "procedure_parameters"-option in OleDbSchemaGuid:

 _conn.GetOleDbSchemaTable(OleDb.OleDbSchemaGuid.Procedure_Parameters, New Object() {})

I can not find another possibility to know, which parameters should be supplied to a procedure in MS-Access.
Any help deeply appreciated!

Regards, Duc
0
Comment
Question by:Duc_de_Belfort
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 12449616
Access does not support STORED PROCEDURES in the same sense that SQL Server or Oracle use the term 'Stored Procedure'

What are you attempting to do?

and the Jet Engine does not directly support getting the Schema from an MDB in any case.

AW
0
 

Author Comment

by:Duc_de_Belfort
ID: 12450569
My goal is to create a flexible Query-Tool in a .NET application. So I built a form with a textbox, a datagrid and a button, when the button is clicked I try to execute the SQLString in the textbox and fill the datagrid with the result dataset.

Example, I create this view in Northwind, named myParamView:
PARAMETERS sCountry TEXT;
SELECT * FROM Orders
WHERE (((Orders.ShipCountry)=sCountry));

When the user enters the name of this view and leaves out the parameter, I want to give him a feedback to enter the appropriate parameter.

I hope I was clear enough...

Duc
0
 
LVL 39

Expert Comment

by:stevbe
ID: 12453335
I think you can instantiate a command object based on the query and then iterate the parameters collection of it.

Steve
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Duc_de_Belfort
ID: 12454724
Steve,
I'm afraid your solution doesn't work. I interpreted your solution similar to:

Dim testcmd As New OleDb.OleDbCommand(myParamView, _conn)
testcmd.Connection.Open()
Debug.WriteLine(testcmd.Parameters.Count)
testcmd.Connection.Close()

The parameters collection does not contain any item...
:-(

Duc
0
 

Author Comment

by:Duc_de_Belfort
ID: 12461270
Just increasing points.... :-)
0
 
LVL 39

Expert Comment

by:stevbe
ID: 12465064
Sorry, ADODB automatically refreshes the parameters collection for you and it sounds like OLEDB does not so you will have to issue the .Refresh directive before getting the count.

cmd.Parameters.Refresh
cmd.Parameters.Count

or to loop through them ...

cmd.Parameters.Refresh
For Each prm In cmd.Parameters
 ...
End If

Steve
0
 

Author Comment

by:Duc_de_Belfort
ID: 12468090
I don't have the possibility to refresh the parameters collection:
refresh is not a member of oledb.oledbParameterCollection....

still :-(

Andri
0
 

Author Comment

by:Duc_de_Belfort
ID: 13139811
Still no solution for this problem, so I will wait ....

:-(
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 13170850
PAQed with points refunded (250)

modulo
Community Support Moderator
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question