Solved

I am trying to use the DataSet Designer to get data from an Access

Posted on 2006-11-10
4
200 Views
Last Modified: 2010-04-23
I am trying to use the DataSet Designer to get data from an Access
Database.  The problem I am having is the sytax for my filter
varaibles.

When using SQL Server I was using @OrderID but when I try that with the
DataSet Designer For Access it won't let me.  SO then I tried ?OrderID:


EX:
SELECT        ItemID, OrderID, ProductID, ProductName, ItemNumber,
Quantity, Price
FROM            ItemsOrdered
WHERE        (OrderID = @OrderID)


SELECT        ItemID, OrderID, ProductID, ProductName, ItemNumber,
Quantity, Price
FROM            ItemsOrdered
WHERE        (OrderID = ?OrderID)


Neither of these will work - what syntax should I use?


0
Comment
Question by:alivemedia
[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
  • 3
4 Comments
 
LVL 13

Expert Comment

by:newyuppie
ID: 17917651
correct me if im wrong but i believe the first one should be working... there must be something else wrong here.
0
 
LVL 13

Accepted Solution

by:
newyuppie earned 500 total points
ID: 17917710
ill correct me... try

SELECT        ItemID, OrderID, ProductID, ProductName, ItemNumber,
Quantity, Price
FROM            ItemsOrdered
WHERE        (OrderID = ?)
0
 
LVL 2

Author Comment

by:alivemedia
ID: 17917791
Your rightm this works:
SELECT        ItemID, OrderID, ProductID, ProductName, ItemNumber,
Quantity, Price
FROM            ItemsOrdered
WHERE        (OrderID = ?)


It just threw me that in the list of methods un thge data designer it doesn't show wha values need to be passed into the method like it does with SQL Server.

Access methods look like this in the deisgner:
FillOrderItemsByOrderID, GetOrderItemsByOrderID

Sql Server methods look like this in the deisgner:
FillOrderItemsByOrderID(@OrderID), GetOrderItemsByOrderID(@OrderID)

Thanks for making me test itout more throughly!!!
0
 
LVL 13

Expert Comment

by:newyuppie
ID: 17917830
glad it worked out. thanks for the grade
NY
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

632 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