Link to home
Start Free TrialLog in
Avatar of alivemedia
alivemedia

asked on

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

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?


Avatar of newyuppie
newyuppie
Flag of Ecuador image

correct me if im wrong but i believe the first one should be working... there must be something else wrong here.
ASKER CERTIFIED SOLUTION
Avatar of newyuppie
newyuppie
Flag of Ecuador image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of alivemedia
alivemedia

ASKER

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!!!
glad it worked out. thanks for the grade
NY