Solved

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now