Modify VB.net SQL search to use pattern -
the code below  works great, , need more :).  vb.net 2008 access database. @ moment matches based on paramvalue, , needs exact match. how can change pattern instead??  example want contains text "fizz" , "bom".
 --and please share link can learn blend of sql+access+vb.net. thank you!  steve
dim table new datatable(tablename) table.locale = system.globalization.cultureinfo.invariantculture  using connection new odbcconnection(connectionstring)     connection.open()      dim query string = string.format("select * [{0}] [{1}] = ?", _                                         tablename, _                                         paramname)     dim selectcommand new odbccommand(query, connection)     selectcommand.parameters.add(new odbcparameter("@" & paramname, paramvalue))      dim adapter new odbcdataadapter(selectcommand)     adapter.fillschema(table, schematype.mapped)     adapter.fill(table) end using  return table      
reference link : here
dim selectqry = "select * [{0}] [{1}] '%" & _                     stryoursearchvalue & " %'"      
Comments
Post a Comment