Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 18th, 2006, 01:00 AM
Registered User
 
Join Date: Oct 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default hi problem on bulk insert command

hi everybody,

i have created a webform with a button to read bulk data from a .CSV file from a path :C:\karfiles\myfile.csv

iam using a bulk insert command to insert all records into database in VS 2005 WINDOW APPLICATION C# USING SQL SERVER 2005.

when i click the button iam getting this exception :

"An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll

Additional information: Could not bulk insert because file 'C:\karfiles\myfile.csv' could not be opened. Operating system error code 3(The system cannot find the path specified.)." at cmd.executenonquery.

i want to trouble shoot this exception .

please can anybody help me?

thanks,
karthik.

 
Old October 18th, 2006, 11:28 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Can you provide the code you are using to Bulk Insert?

Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
 
Old October 18th, 2006, 11:32 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Just a thought, try using a UNC path, such as 'machinename\\c:\karfiles\myfile.csv', or \\machinename\pathname\myfile.csv'...

Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html





Similar Threads
Thread Thread Starter Forum Replies Last Post
Bulk Insert Problem starnet SQL Server 2005 5 April 17th, 2007 08:34 AM
hi problem on bulk insert command karthikc85 SQL Server ASP 1 November 8th, 2006 04:22 AM
Bulk Insert Problem pseudo SQL Server 2000 2 October 4th, 2006 06:48 AM
Problem with Bulk Insert starnet SQL Server 2000 1 September 13th, 2006 08:29 AM
BULK INSERT PROBLEM ZoroAstris SQL Language 3 January 3rd, 2005 09:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.