SQL with ADODC ... please help me! - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

SQL with ADODC ... please help me!

cvmancvman Posts: 2Member
I have a database in access 2000 and an ODBC connected to it.

"Selected_Item" suports the ID of a record selected in the database by a TextBox.

Now, I want to create a query goes to the database and retrieves the lines on a certain table where that ID exists.

The ODBC has that possibility but when I try to do it, something goes wrong and the message:

"Invalid value was gives for one or more parameters".



Resume:

I want to do something like this:


Select Name,Phone,Adress from Adresses where ID = "Selected_Item"



Please help me couse with this I could finish my software in no time.

My e-amil: [email protected]; [email protected] or [email protected]

Thanks

Rolando Arajo

Comments

  • grarungrarun Posts: 40Member
    [b][red]This message was edited by grarun at 2005-4-21 12:3:56[/red][/b][hr]
    : I have a database in access 2000 and an ODBC connected to it.
    :
    : "Selected_Item" suports the ID of a record selected in the database by a TextBox.
    :
    : Now, I want to create a query goes to the database and retrieves the lines on a certain table where that ID exists.
    :
    : The ODBC has that possibility but when I try to do it, something goes wrong and the message:
    :
    : "Invalid value was gives for one or more parameters".
    :
    :
    :
    : Resume:
    :
    : I want to do something like this:
    :
    :
    : Select Name,Phone,Adress from Adresses where ID = "Selected_Item"
    :
    :
    :
    : Please help me couse with this I could finish my software in no time.
    :
    : My e-amil: [email protected]; [email protected] or [email protected]
    :
    : Thanks
    :
    : Rolando Arajo
    :



    There may be some type mismatch. Sice U didn't show us the exact code
    Your Query statement must be like this.

    If ID is a string type(varchar) then

    "Select Name,Phone,Adress from Adresses where ID = '" & textbox.text "'"

    if it is a numeric value

    "Select Name,Phone,Adress from Adresses where ID = " & textbox.text

    hope this helps U.







  • softrickssoftricks Posts: 24Member
    : I have a database in access 2000 and an ODBC connected to it.
    :
    : "Selected_Item" suports the ID of a record selected in the database by a TextBox.
    :
    : Now, I want to create a query goes to the database and retrieves the lines on a certain table where that ID exists.
    :
    : The ODBC has that possibility but when I try to do it, something goes wrong and the message:
    :
    : "Invalid value was gives for one or more parameters".
    :
    :
    :
    : Resume:
    :
    : I want to do something like this:
    :
    :
    : Select Name,Phone,Adress from Adresses where ID = "Selected_Item"
    :
    :
    :
    : Please help me couse with this I could finish my software in no time.
    :
    : My e-amil: [email protected]; [email protected] or [email protected]
    :
    : Thanks
    :
    : Rolando Arajo
    :
    ----------------------------------------------------------------
    hi,
    first be sure that your sql is right
    copy and paste this in to your code:

    "Select Name,Phone,Adress from Adresses where ID =&'"Selected_Item"' &"'"

    you must supply the right parameters in the right syntax

    OR
    you can find your request at www.softricks.5u.com
Sign In or Register to comment.