User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 425,936 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,619 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 5257 | Replies: 2
Reply
Join Date: Feb 2007
Posts: 2
Reputation: dazlerd is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
dazlerd dazlerd is offline Offline
Newbie Poster

Passing multiple Ids into one MS Access query parameter

  #1  
Aug 30th, 2007
Hi everyone

This is my first post so please help me out !!

I am writting an application in VB.NET to print orders. The orders are shown on screen in a listview and the user can select individual orders/range of orders to print.

This Access query looks like:

PARAMETERS OrderIds Text ( 255 );
SELECT orders.*, orderdetails.*
FROM orders, orderdetails
WHERE orders.orderid=orderdetails.orderid And orders.orderid IN (OrderIds);

How do I from vb.net pass the OrderIds parameter into this query with mulitple orderids?

e.g. passing "123-456" works
passing " '123-456', '123-789' " doesn't.

Thanks

Darren
Last edited by dazlerd : Aug 30th, 2007 at 8:48 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2007
Posts: 6
Reputation: muskdial is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
muskdial muskdial is offline Offline
Newbie Poster

Re: Passing multiple Ids into one MS Access query parameter

  #2  
Sep 2nd, 2007
Originally Posted by dazlerd View Post
Hi everyone

This is my first post so please help me out !!

I am writting an application in VB.NET to print orders. The orders are shown on screen in a listview and the user can select individual orders/range of orders to print.

This Access query looks like:

PARAMETERS OrderIds Text ( 255 );
SELECT orders.*, orderdetails.*
FROM orders, orderdetails
WHERE orders.orderid=orderdetails.orderid And orders.orderid IN (OrderIds);

How do I from vb.net pass the OrderIds parameter into this query with mulitple orderids?

e.g. passing "123-456" works
passing " '123-456', '123-789' " doesn't.

Thanks

Darren

Hi Darren
I'm not sure I can answer your question but I wrote an application for
Coumadin Dosing / Database where I use Crystal Reports to print out
my records. Take a look at my web site http://www.pace-med-apps.com/Warfarin2.aspx
near the middle of the page. If this looks like some thing that may be helpful
then email me drp@spmd.us

Take Care
Scott
Last edited by muskdial : Sep 2nd, 2007 at 8:01 pm. Reason: realign
Reply With Quote  
Join Date: Feb 2007
Posts: 2
Reputation: dazlerd is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
dazlerd dazlerd is offline Offline
Newbie Poster

Re: Creating Crystal report using MS Access query

  #3  
Sep 5th, 2007
Hi Scott

Thanks for your reply.

That app looks good although I have no ides what its doing !!

Im not sure if that is right for my app. I need to pass in a list of orderids and return all the details for them. You seem to be passing in one and potentailly returning many (if you use wildcards).

Ive had an answer on another forum but i havent worked out how to use it yet.

http://support.microsoft.com/kb/210530

Thanks

Darren
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb VB.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the VB.NET Forum

All times are GMT -4. The time now is 9:23 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC