Solved

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

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

Technology Partners: 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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

713 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