|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Select in with like - ado.netHi,
can I use wildcards in a select command. My command is like this SELECT ID FROM songs WHERE (Title LIKE in(?)) if I remove the 'like' or the 'in' it works. together it doesn't of course without the in I need the correct names and with the like I add the '%' thanks Jan "JR" <XX***@XX.XX> schrieb SQL is not part of the VB.Net language. As your subject says, the ADO.Net > Hi, > > can I use wildcards in a select command. My command is like this > SELECT ID FROM songs WHERE (Title LIKE in(?)) > if I remove the 'like' or the 'in' it works. together it doesn't > > of course without the in I need the correct names and with the like > I add the '%' group is the best place to ask: microsoft.public.dotnet.framework.adonet Armin JR,
Be aware that AFAIK SQL has a lot of dialects depending of the used DataBase Server If you ask can I use it, than the answer is yes, however how means that you would have to tell what databaseserver. One of the best places to ask this is by the way as Armin wrote. I hope this helps, Cor Show quoteHide quote "JR" <XX***@XX.XX> schreef in bericht news:UVKvf.90440$V%7.5969034@phobos.telenet-ops.be... > Hi, > > can I use wildcards in a select command. My command is like this > SELECT ID FROM songs WHERE (Title LIKE in(?)) > if I remove the 'like' or the 'in' it works. together it doesn't > > of course without the in I need the correct names and with the like I add > the '%' > > thanks Jan > the controls are oleDB with access database
Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schreef in bericht news:OpvrQr2EGHA.1424@TK2MSFTNGP12.phx.gbl... > JR, > > Be aware that AFAIK SQL has a lot of dialects depending of the used > DataBase Server > > If you ask can I use it, than the answer is yes, however how means that > you would have to tell what databaseserver. > > One of the best places to ask this is by the way as Armin wrote. > > I hope this helps, > > Cor > > "JR" <XX***@XX.XX> schreef in bericht > news:UVKvf.90440$V%7.5969034@phobos.telenet-ops.be... >> Hi, >> >> can I use wildcards in a select command. My command is like this >> SELECT ID FROM songs WHERE (Title LIKE in(?)) >> if I remove the 'like' or the 'in' it works. together it doesn't >> >> of course without the in I need the correct names and with the like I add >> the '%' >> >> thanks Jan >> > > I use the following sql to open a datareader and it works fine:
DBCmd = New OleDb.OleDbCommand("SELECT Name FROM Recipes WHERE _ RecipeName LIKE '%cake'" , DBConn) RDR = DBCmd.ExecuteReader Note that %Cake is enclosed in single quotes. -- Show quoteHide quoteDennis in Houston "JR" wrote: > the controls are oleDB with access database > > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schreef in bericht > news:OpvrQr2EGHA.1424@TK2MSFTNGP12.phx.gbl... > > JR, > > > > Be aware that AFAIK SQL has a lot of dialects depending of the used > > DataBase Server > > > > If you ask can I use it, than the answer is yes, however how means that > > you would have to tell what databaseserver. > > > > One of the best places to ask this is by the way as Armin wrote. > > > > I hope this helps, > > > > Cor > > > > "JR" <XX***@XX.XX> schreef in bericht > > news:UVKvf.90440$V%7.5969034@phobos.telenet-ops.be... > >> Hi, > >> > >> can I use wildcards in a select command. My command is like this > >> SELECT ID FROM songs WHERE (Title LIKE in(?)) > >> if I remove the 'like' or the 'in' it works. together it doesn't > >> > >> of course without the in I need the correct names and with the like I add > >> the '%' > >> > >> thanks Jan > >> > > > > > > >
Armin - Start sound problem revived in new thread
Loading data in the flexgrid takes long time Paging, Filtering and Sorting Deploying VB .NET application WITH MS Access db adding asynchronous support VB 2003 - Odd Bug in My Program Db Interaction spped issue with upgraded code from vb6 to vb.net Add a line break in label.text How to trap if a cancel has occurred on cell validation? Collection |
|||||||||||||||||||||||