Solved

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

Posted on 2006-11-10
4
199 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

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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