How can I populate a parameter in an OLEDB select command?

Posted on 2004-11-15
Last Modified: 2010-04-23
This is the select command text

        Me.OleDbSelectCommand1.CommandText = "SELECT Auto_ID, Last_Name, First_Name, Date_Created, Transaction_Type, Service_Type, Notes, Due_Date, SSN, Phone_Number, Address, City, State, Zip, Total_Charges, Total_Payment, Total_Balance, Created_By, Status, IsVoid FROM Transaction_Information WHERE (IsVoid = 0) AND (Auto_ID = ?)"

If i want to use a variable to populate the Parameter '?'
how would I use the Me.OleDbSelectCommand1.Parameters.Add command

and how would I go about changing the value and updating the parameters value?

Any Answers?
Question by:LCiaccio
    LVL 4

    Accepted Solution

    hi, may be you need this:      
           OleDbSelectCommand1.Parameters.Add("AutoID", OleDbType.Int);
           OleDbSelectCommand1.Parameters["AutoID"].Value =  ' get the value here
    Hope this helps.

    Author Comment

    Your on the money....

    Sorry I didn't respond sooner.... I fell asleep...Awake now...

    LVL 4

    Expert Comment

    Happy programming, buddy.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video discusses moving either the default database or any database to a new volume.

    728 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

    18 Experts available now in Live!

    Get 1:1 Help Now