BulkCopy and SQL Server 2008

14 views
Skip to first unread message

tma1313

unread,
Nov 17, 2009, 10:55:54 PM11/17/09
to CSVChat
Bruce,

I've used your component to insert into sql for years....I distributed
an application today that worked fine on sql 2005, but failed on
another PC connected to sql 2008.

Any known issues with sql 2008 and your datastreams bulkcopy method?

Thanks!

John Dorman

shriop

unread,
Nov 18, 2009, 12:48:42 AM11/18/09
to CSVChat
No, I wouldn't think that's the problem. Were you able to get any more
information about the failure? Was there an error message?

Bruce Dunwiddie

John Dorman

unread,
Nov 18, 2009, 1:25:26 PM11/18/09
to csv...@googlegroups.com
Bruce,
 
The error my app recorded was
 

Error on BulkCopyCSVFile - Error Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

 
It's a local version of sql server 2008 running on a laptop.  We were querying the tables from Management Studio, and the tables were empty.  So, I know sql was functional.
 
Thanks for your help!
 
John
 


--

You received this message because you are subscribed to the Google Groups "CSVChat" group.
To post to this group, send email to csv...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/csvchat?hl=.



shriop

unread,
Nov 18, 2009, 10:39:14 PM11/18/09
to CSVChat
My bet is that this has nothing to do with DataStreams or SqlBulkCopy.
I bet you get the exact same error message if you just try to
instantiate a SqlConnection object and open the connection. I think
you just need to enable TCP connections. Management Studio might be
using named pipes to connect. Try following the steps at
http://msdn.microsoft.com/en-us/library/bb909712.aspx under "To enable
the TCP/IP protocol for the database instance". If it appears that TCP
was already enabled and you have already tried restarting the service,
then try opening a SqlConnection object and see if I'm right that it
fails also. Let me know where you end up from here.

Bruce Dunwiddie
> >http://groups.google.com/group/csvchat?hl=.- Hide quoted text -
>
> - Show quoted text -

John Dorman

unread,
Nov 19, 2009, 7:36:27 AM11/19/09
to csv...@googlegroups.com
Bruce,
 
Turned out to be a connection string error....the app sends and receives encrypted connection strings via a web service.

 

Wish the sql NET error message had neem a little more helpful.
 
Worked like a charm after that.
 
As always, happy to give your product a rave review!

 

Thanks.

 

John
Reply all
Reply to author
Forward
0 new messages