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?
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?
correct me if im wrong but i believe the first one should be working... there must be something else wrong here.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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(@O rderID), GetOrderItemsByOrderID(@Or derID)
Thanks for making me test itout more throughly!!!
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(@O
Thanks for making me test itout more throughly!!!
glad it worked out. thanks for the grade
NY
NY