I have a text stream that I can save as a txt file and then call sql server stored proc to bulkinsert that txt file.
But I don’t want to deal with file system access and all that stuff. and sqlBulkCopy can’t do it I beleive. What’s the solution then?
If the incoming stream represents rows for a table, then you can write a custom IDataReader implementation that reads from the stream and presents each row in turn (non-buffered). You can then feed this to SqlBulkCopy.
Example: https://groups.google.com/group/microsoft.public.dotnet.languages.csharp/msg/b1d70b504cdee2ad?hl=en&pli=1