Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 18th, 2006, 01:00 AM
Registered User
 
Join Date: Oct 2006
Location: hyderabad, andhrapradesh, India.
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.

Reply With Quote
  #2 (permalink)  
Old October 18th, 2006, 11:28 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Wellington, FL , USA.
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
Reply With Quote
  #3 (permalink)  
Old October 18th, 2006, 11:32 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Wellington, FL , USA.
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 03: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 08:18 AM



All times are GMT -4. The time now is 11:58 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.