Howdy, Stranger!

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

Categories

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.