Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP 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
Thread Tools Display Modes
  #1 (permalink)  
Old October 18th, 2006, 01:04 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?


Reply With Quote
  #2 (permalink)  
Old November 8th, 2006, 03:22 AM
Registered User
Join Date: Nov 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to talenone Send a message via MSN to talenone Send a message via Yahoo to talenone

Hi Karthik,

First make sure you have been granted access as sysadmin or bulkadmin.

Secondly make sure the file exist in the same path.

Thirdly make sure you are using this command:

BULK INSERT <YourTableName>
FROM 'c:\karfiles\myfile.csv'

If still not executing then let me know.

Danish Sami.
Reply With Quote

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 2005 2 October 18th, 2006 11:32 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 12:34 PM.

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