473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

sqlexception was caught in c#and sqlserver running code

Expand|Select|Wrap|Line Numbers
  1. private void button1_Click(object sender, EventArgs e)
  2.         {
  3.             try
  4.             {
  5.                 SqlConnection sc = new SqlConnection(@"Data Source=KALAS-PC\SQLEXPRESS;Initial Catalog=master;Integrated Security=True");
  6.                 sc.Open();
  7.                 using (sc)
  8.                 {
  9.                     // FILEDOWNLOADED();
  10.  
  11.                     SqlCommand cmd = new SqlCommand(@" Bulk insert csvFile from 'D:\cm02SEP2014bhav.csv' with
  12.                                       (
  13.  
  14.                                       FIELDTERMINATOR =',',
  15.                                       ROWTERMINATOR ='\n'
  16.                                       )", sc);
  17.                     cmd.ExecuteNonQuery();
  18.                     sc.Close();
  19.  
  20.                 }
  21.             }
  22.             catch (Exception ex)
  23.             {
  24.                 MessageBox.Show("Error");
  25.             }
i got this error...
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 3 (OPEN).
The bulk load failed. The column is too long in the data file for row 1, column 13. Verify that the field terminator and row terminator are specified correctly.
The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.
Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".pls help me
Sep 3 '14 #1
0 1045

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Christopher Brandsdal | last post by:
Hi! I have a problem running my code on 2000 server and iis5.0. The code runs perfectly on my localhost (xp iis5.1) but when i run it on 2000 server iis5.0 I get this error: ...
0
by: DHRRush | last post by:
When working in Access 2000, if I'm in the code editor and want to run or step through code to debug or test, instead of the code running (whether from beginning of sub, or anywhere in the sub), I...
7
by: Michael C | last post by:
Hi all, Just started having a problem with the IDE. When I try to 'start' code in the IDE the IDE locks up. It builds and re-builds OK, and I can run the generated EXE outside the IDE, but...
12
by: Bret Pehrson | last post by:
Suppose the following: // Unmanaged code class UnmanagedException /* not visible outside of unmanaged code */ { }; void DoSomething() /* visible (exported) to managed code */ { throw new...
2
by: Matthias H. | last post by:
Hi guys, Our team has a very strange problem. I hope anybody can help. We have a class called webpage and all our aspx-pages bases on it. Then we have a SYS.IO.File Class which have a...
7
by: iclinux | last post by:
Environment: WinXP SP2 + Python 2.4.2, with SOAPpy-0.11.6.zip, fpconst-0.7.2.zip, and PyXML-0.8.4.win32-py2.4.exe installed. Problem: I'm reading DiveIntoPython these days. When running code...
16
by: Albretch Mueller | last post by:
I need to get the name of the very code running in order to include it in a time stamped log file. .. As I remember, there is an ANSI standard way to ask a running program for its name. But I...
4
by: JakkyTchong | last post by:
Hi, I'm writing a .dll. I'd like to know how to stop all the code running from anywhere in the solution. For example: -A class of the .dll is called from an .exe. -Function A is called from the...
1
by: rameshonweb | last post by:
Can some one help to change the below code with oracle database instead of sqlserver private void SortDataList(string strSort) { SqlConnection objConn = new...
1
anoble1
by: anoble1 | last post by:
Hi, In Access, I am getting error: excel object variable or with block variable when running code. The code runs fine the first time when I start it. When I close excel and hit the button again it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.