Re: Parameter it doesn't work (for me) II



As you were told last time you posted this question, the wildcard for like
in ADO and ADO.NET is %, not *.


"Fia" <fiaolle@xxxxxxxxx> wrote in message
news:%2309jVdbOFHA.3444@xxxxxxxxxxxxxxxxxxxxxxx
> Hi again
> I tried the code below and know the CommandText looks like it should from
> the Trace,
> but I still don't get any records.
> When I'm running the SQL statement in the Access database I get records.
>
> sökaOrdCom = New OleDbCommand("Select * from kött where köttid Like " &
> "'"
> & PubStr & "*'", DBConn)
> sökaOrdRead = sökaOrdCom.ExecuteReader
> Trace.WriteLine(sökaOrdCom.CommandText)
>
> Do While sökaOrdRead.Read
> recCount += 1 'this code never happens
> Loop
>
> I don't get this, please help me.
>
> Fia
>
>


.



Relevant Pages

  • Re: Use of wildcards in a ServerFilter
    ... > What do I do if I want to use a variable with the wildcard (instead of ... Note that ADO always uses single quotes, not double ones, so ... Prev by Date: ...
    (microsoft.public.access.modulesdaovba)
  • Re: newbie needs help - sql select statement
    ... The wildcard for Access using ADO is %. ... "Newbee Adam" escribió en el mensaje ... > I have tried multiple alterations of that syntax to no availe. ...
    (microsoft.public.vb.database)
  • Re: Efficiency
    ... I'll try the other wildcard when this latest batch ... How are you making the connection to Access? ... Using DAO, or ADO? ... Allen Browne - Microsoft MVP. ...
    (microsoft.public.access.queries)
  • Re: Field Validation Rule fails in VBA !
    ... to indicate that it has something to do with ADO using the ANSI standard wildcard '%' instead of the Jet wildcard '*'. ... I have not tested creating a validation rule using the '%' wildcard via ADO, that might be a possible solution you might want to investigate. ... how do you use transactions with DAO? ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Need help finishing a simple query
    ... And, in Visual Basic Script (which I believe is what FrontPage uses), ADO ... > wrote:>>>In the FrontPage discussion group I asked a question about a query and I>>received the following response:> ... It would also help to know what is in the> criterion and what is in the field you're searching, and what sort of> wildcard match you have in mind. ...
    (microsoft.public.access.queries)