Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2005
    Posts
    8

    Unanswered: ADO trouble with named parameters

    Hi,

    first i search on the wrong end of this problem.
    So please read this Post for detailed informations.

    My Problem ist simple but heavy.
    My Command.Parameter Objects ignor there names und inserting herself only in the order the programm will get her.

    Is it normal that parameter would be insert on the position in order who there get ?
    Is the SQL String (i.e.):
    Code:
    select col0 from tbl1 where col1=:param1 and col2 =:param2;
    So VB do that so:
    1st param get: name "param1" value.....
    2nd param get: name "param2" value....
    It works fine!
    But:
    1st param get: name "param2" value...
    2nd param get: name "param1" value...
    So VB will but the param "param2" on the col1 clausel and "param1" to the col2 clausel.
    pls help me.
    HTH Shura

  2. #2
    Join Date
    Oct 2004
    Location
    In cousin's house
    Posts
    303
    I think this command is from delphi sql
    select col0 from tbl1 where col1=aram1 and col2 =aram2

    Tyr this code

    select col0 from tbl1 where col1=? and col2 =?

  3. #3
    Join Date
    Jan 2005
    Posts
    8
    Thanks for your Hint, meanwhile someone tell me, that the parameters MUST be in the correct order deliever.
    I didn't understand why the params have name when there are useless für param.querys...

    HTH Shura

    //edit: i can't try this sql code. oracle accept's only "...where x= aram.." for param. querys. but thanks

  4. #4
    Join Date
    Oct 2004
    Location
    In cousin's house
    Posts
    303
    Sory, I thought ur using a ms Sql server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •