SqlBulkCopy: the locale id '0' of the source column '<column name> ' and the locale id '1033' of the destination column '<column name>' do not match.


Hi,

I am using the sqlbulkcopy object to transfer large amount of data from one SQL server to Other. The code look like this..

SqlDataReader

readerSrc = null;
SqlBulkCopy bulkCopy = new SqlBulkCopy(connDest);
//Prepare Destination Table.
SqlCommand cmdDelete = new SqlCommand("DELETE FROM " + destTableName, connDest);
//Set the sqlcommand text
SqlCommand cmdGet = new SqlCommand("SELECT * FROM " + srcTableName, connSrc);
//Open source connection.
connSrc.Open();
//Open destination connection.
connDest.Open();
int delete = cmdDelete.ExecuteNonQuery();
//Get the data.
readerSrc = cmdGet.ExecuteReader();
//begin transfering data to destination
bulkCopy.DestinationTableName = destTableName;
bulkCopy.BatchSize = 100;
bulkCopy.WriteToServer(readerSrc);

bulkCopy.Close();
connSrc.Close();
connDest.Close();

but I get this error when it runs. Data is going to be copied from SQL 7.0 server and inserted into SQL2000 database.

the locale id '0' of the source column '<column name> ' and the locale id '1033' of the destination column '<column name>' do not match.

I have checked the columns and types on both server are exactly the same accept the constrians on the source (sql7.0) does not exist on the destination (sql2000). this souldn't be problem. however, if I peform this operation with the same version of SQL server (from sql2000 to sql2000), it works! :-(

can anyone help me out here? please

Thanks in advance.


[#Hardcoder#]
0
Matrix
7/28/2006 9:49:11 PM
asp.net.object-datasource 16182 articles. 0 followers. Follow

1 Replies
3052 Views

Similar Articles

[PageSpeed] 27

Martix Codes:
I have checked the columns and types on both server are exactly the same accept the constrians on the source (sql7.0) does not exist on the destination (sql2000).

Have you checked the collations for the columns? I guess the problematic columns are storing characters.


Welcome to my SQL/ASPNET forum for Chinese
http://51up.org/bbs/forumdisplay.php?fid=38
0
Iori_Jay
8/7/2006 8:11:11 AM
Reply:

Similar Artilces:

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

'''''
Name: mario Email: ramar17atfastwebnetdotit Product: Gran Paradiso Alpha 2 Summary: ''''' Comments: K: Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2) Gecko/20070206 GranParadiso/3.0a2 ...

'<name>' is not a member of '<classname>'
I am posting this question as I am unsure how to proceed. I recently migrated a web project from .net 2003 to 2005. I have been able to work out most of the issues, but, unfortunaltely I am left with a few I do not understand. The error shows Error 17 'ddlQualSource' is not a member of 'CwMerge.ucFileUpload'. When I look for the object which is DropDownList it exists on a web form. The only 2 references to this object is in the HTML and the code below showing when it is loading with data. What I need to do is use the users selection later on in the project on a different web f...

DetailsView Converts '<' & '>' to '&lt;' & '&gt;'
I have multi-line textboxes from which the data is stored as a text value in the SQL database. Before the data is passed to the stored procedure, the text is parsed to replace all vbNewLIne and vbLf cases with "<br/>". This is done successfully, storing the text in the database with the "<br/>" tags. When the data is displayed, I want the text data dropped into the page as is; meaning "<br/>" in the database appears as "<br/>" in the source. However, the DetailsView object into which the values are being passed seems to be trans...

Select where column IN ('DC123', 'WQ242', 'GT654', 'EL982', ......);
Which will be faster given that the list of IDs can be quite large (hundreds or thousands of IDs)? For count = 1 to rows ls_ID = dw_1.GetItemString(count, "id") dw_2.Retrieve(ls_id)//RetrieveStart = 2 Next OR Or modifying the select statement... select column1, column2.....where ID IN ('DC123', 'WQ242', 'GT654', 'EL982', ......); Ido you can also used an argument of the type string array with your datawindow : string ls_id[] For count = 1 to rows ls_id[count] = dw_1.GetItemString(count, "id") Next dw_2...

Give access to non virtual folder through configuration entry? ERROR: <location> path attribute must be a relative virtual path. It cannot contain any of '?' ':' '\' '*' '"' '<' '>' or '|'.
I have a webpage running under a virtual directory that is mapped to d:/webapplication that produces an excel spreadsheet, the page calls a library object that generates a report and places it in a folder d:/attachments. This folder is not in the virtual directory. When I access the webpage i click a button and it attemps to return the created spreadsheet as a mim content type application/vnd.ms-excel. However i getting redirected back to the login page of the application. Ive also noticed that the excel spreadsheet has not even been created at this location. So assuming this...

The type '<class>' exists in both '<dll location>' and '<dll location 2>'
Hi. Has anyone come across this problem upgrading VS2003 to VS2005:The type '<class>' exists in both '<dll location>' and '<dll location 2>' Thanks! Hi TinaFMills,   Did you finish the process of migrate project form 2003 to 2005?   The error message means duplicate class name in different locations. Such as aspx pages, user controls, custom controls and so on. Please load the solution in Visual Studio IDE try to find the duplicate class. Edit->File and Replace->Find In Files (look in entire solution)    Sincerely,Benson YuMicrosoft Online...

The type '<class>' exists in both '<dll location>' and '<dll location 2>'
For some reason though it appears that one of my class files (_common.cs - in the App_Code directory) is being included in the WAP .dll file as well as when it compiles the App_Code at runtime.error CS0433: The type 'inlinehockey._common' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\25321638\9b5c4b00\assembly\dl3\3657f4e6\cd91aef5_4d5cc601\inlinehockey.DLL' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\25321638\9b5c4b00\App_Code.xad_ajc1.dll'  The error was not knowing what dll to use for the type w...

'do' won't 'do' if '/'
Greetings to All from Au, Have a NetWare Perl 5.8.4 and wanted to tweak File\Spec\NW.pm to try and standardise on '/' separators. If I run a test script (t/uni/lower.t) with an unmodified NW.pm, it calls t/uni/case.pl, that, in case.pl, (when the path separators are '\'), the $file is '..\lib\unicore\To\Lower.pl' and the following code portion works, with $simple getting a returned table: sub casetest { my ($base, $spec, $func) = @_; my $file = File::Spec->catfile(File::Spec->catdir(File::Spec->updir, "lib", &qu...

'''
Name: L Lachowsky Email: e2brutus_10atyahoodotcom Product: Firefox Summary: ''' Comments: why duddn this surprise me... I change default server from IE to Mozilla, and then i get error messages. well, shud I decide to not get on my computer with Mozilla..or shud I risk security breeches with IE....hmmm at least i can get on the internet with IE Browser Details: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this fee...

Allowing '->' and '=>' in C<...>
On Tue, Jan 25, 2000 at 12:03:51AM -0500, Ronald J Kimball wrote: > I'm concerned that someone may find another exception, and then another, > and then another, and soon POD parsing becomes extremely complicated. Too late - thats already the case with special-handling -> and => inside of C<...>. It won't get significantly more or less complicated by limiting what can appear to the left of [-=]>. In fact its more likely to make the code less complicated. > > its not enough to simply be '->' or '=>', perhaps we only want to allo...

Cast from type ''''DBNull'''' to type ''''String'''' is not valid.
How do I avoid getting this error: Cast from type ''''DBNull'''' to type ''''String'''' is not valid. I am trying to get values from the database into a form for updating using a Datareader, SQL is set to allow nulls for certain fields as they are not required but the only way I can get the form to display is by adding a space in SQL. Is there another way around this? Check if it is equal to DBNull.Value first and if it is, don't do the cast.Stanley Tan theSpoke Blog Where in the code does it need to go? I am using the following and it's the profile that isn't always requi...

Handling of '>>>' and '-- '
Hi all, A couple of queries: 1) Is there a way to STOP Thunderbird from indenting replies with >>>>>>'s in e-mail (but not newsgroups)? 2) Is there a way to STOP Thunderbird from deleting everything that comes after a '-- ' on reply? If the answer is no, what'd be the best way to go about getting these 'features' added? Cheers, Cyker none wrote: > Hi all, > > A couple of queries: > 1) Is there a way to STOP Thunderbird from indenting replies with >>>>>>'s in e-mail (but not newsgroups)? > >...

[ID 20010215.001] 'perl -ep <cmd>' != 'perl -p -e <cmd>'
Hi PERL team, Congratulations on the ongoing excellent work. I found today that the command-line invocation fails not support UNIX-style multiple switches, and does not warn of this: perl -ep '<cmd>' will not work correctly whereas: perl -p -e '<cmd>' does. I suggest you need at least a warning when you ignore superfluous cmdline args. Secondly: a documentation request ('man perlrun') for the octal codes for the -0 switch (or at least, the common separator codes e.g. tabs, space, comma, colon) Best regards, Stephen McInerney ...

Web resources about - SqlBulkCopy: the locale id '0' of the source column '<column name> ' and the locale id '1033' of the destination column '<column name>' do not match. - asp.net.object-datasource

Resources last updated: 11/23/2015 8:21:02 AM