|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Results from SP as CSV file (BCP or SQLDMO)I have an app that executes a stored procs and writes out the data to a file. Currently uses ADO recordset and goes through each record. This is slow. I would like to use bulkcopy - however have the problem that the app resides on a client machine - so will not have SQL server installed. That means I can rule out using the BCP utility unless I do something messy like create a share on the client machine visible from the Server. Is it possible to copy the BCP utility (exe only) to a client machine - so they can run that? Tried with SQLDMO but only tables and views have the exportdata method. Its NOT possible for me to create temp tables and insert the data (from Stored proc) in there first then export. Any ideas? Thanks Hello yitzak,
Copying data out using ADO should be quick. The key is to reduce anything in your loop to the minimum. Can you post your code for copying out to a file Show quote > Hi > > I have an app that executes a stored procs and writes out the data to > a file. Currently uses ADO recordset and goes through each record. > > This is slow. > > I would like to use bulkcopy - however have the problem that the app > resides on a client machine - so will not have SQL server installed. > That means I can rule out using the BCP utility unless I do something > messy like create a share on the client machine visible from the > Server. > > Is it possible to copy the BCP utility (exe only) to a client machine > - so they can run that? > > Tried with SQLDMO but only tables and views have the exportdata > method. Its NOT possible for me to create temp tables and insert the > data (from Stored proc) in there first then export. > > Any ideas? > > Thanks > use OSQL , from any cleint, specify your sp as a query and use output to
file option. Show quote "Simon Sabin" <SimonSabin@nospam.nospam> wrote in message news:89dca5dba9788c8398cc6ff8d00@msnews.microsoft.com... > Hello yitzak, > > Copying data out using ADO should be quick. The key is to reduce anything > in your loop to the minimum. > > Can you post your code for copying out to a file > >> Hi >> >> I have an app that executes a stored procs and writes out the data to >> a file. Currently uses ADO recordset and goes through each record. >> >> This is slow. >> >> I would like to use bulkcopy - however have the problem that the app >> resides on a client machine - so will not have SQL server installed. >> That means I can rule out using the BCP utility unless I do something >> messy like create a share on the client machine visible from the >> Server. >> >> Is it possible to copy the BCP utility (exe only) to a client machine >> - so they can run that? >> >> Tried with SQLDMO but only tables and views have the exportdata >> method. Its NOT possible for me to create temp tables and insert the >> data (from Stored proc) in there first then export. >> >> Any ideas? >> >> Thanks >> > > |
|||||||||||||||||||||||