oracle - VB.NET Multiple Selects at once using SQL Server CE -


i have array list contains ids items. perform multiple select @ once sql server ce database , using array list contains items id selected, similar when doing example multiple update in oracle (odp.net) explained here: oracle bulk updates using odp.net

where can pass array parameter.

i same multiple select instead in case of sql server ce. possible?

draft do:

sqlcecommand = sqlceconnection.createcommand() sqlcecommand.commandtext = "select * mytable id=:ids" sqlcecommand.commandtype = commandtype.text  sqlcecommand.parameters.add(":ids", dbtype.int32, arraylistofids, parameterdirection.input)  using reader system.data.sqlserverce.sqlcedatareader = sqlcecommand.executereader()   using targetdb oracle.dataaccess.client.oraclebulkcopy = new oracle.dataaccess.client.oraclebulkcopy(con.connectionstring)     targetdb.destinationtablename = "mytable"     targetdb.batchsize = 100     targetdb.notifyafter = 100     targetdb.bulkcopyoptions = oracle.dataaccess.client.oraclebulkcopyoptions.useinternaltransaction     addhandler targetdb.oraclerowscopied, addressof onoraclerowscopied targetdb.writetoserver(reader)     targetdb.close()   end using   reader.close() end using 

you should try approach constructing "in" clause , adding each parameter in each loop:

sqlcecommand = sqlceconnection.createcommand()  sqlcecommand.commandtype = commandtype.text dim sb new stringbuilder() dim integer = 1  each id integer in arraylistofids     ' in clause     sb.append("@id" & i.tostring() & ",")      ' parameter     sqlcecommand.parameters.add("@id" & i.tostring(), dbtype.int32, id, parameterdirection.input)      += 1 next 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -