.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Import Wizard fails because it is scared of potential data loss

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :Sql Server

I have a monthly reporting process that requires that I pull data from one system (System A) and load it into SQL Server (System B), the system I'm pulling from generates a .CSV file.  I have a table already built in SQL server to load the data in to with the exact same column names as the .CSV and the datatypes match those that are in System A.

However when trying to load the .CSV via the import wizard it fails because it thinks there is the potential for data loss.  Is there a way to override this overbearing tendency? Because the datatypes match there should be no way that data is lost.

View Complete Post

More Related Resource Links

Import and Export Data (32-bit) Wizard to Dump Data to Excel


I am trying to export some data from a simple three-column table on my SQL 2008 R2 instance to Excel 2007 (also happens in Excel 2003). Our data has a lot of foreign (Hebrew) characters on it and although the copy works ok, the data as it appears in Excel is gibberish.

The source table in SQL contains three columns:

  • smallint - numbers
  • varchar(30) - hebrew text
  • varchar(50) - hebrew text
  • varchar(15) - hebrew text

When I fire up the Import-Export wizard I see the following: http://img524.imageshack.us/img524/1830/sqltable.png. When I click on the yellow warning for a conversion problem, I see this: http://img375.imageshack.us/img375/4255/conversion.png.

Do I need to modify the core SQL or change the data type? I already tried modifying the destination datatype to be varchar instead of LongText but that didn't help.

Any assistance would be fantastic!


mergecontentdbs successfull... with data loss

With the December 2007 release of SP1, a new stsadm command was introduced: mergecontentdbs. I had the opportunity to use this wonderful new command just a few weeks ago (saving my bacon from a rogue site collection which caused upgrade failure--fortunately I had the October 9, 2007, Security Update which gave me the mergecontentdbs command--SP1 upgrade would fail without getting rid of the rogue). Sadly, I learned a week after using the command in our production environment that it ever so conveniently deletes all content from lookup fields with multiple selections. Not even the versioning information is kept; the field only has to allow multiple selections; and, it even affects user/group fields! Talk about get egg on my face when I asked one of our groups where their data had gone!

Turns out, this specific problem is documented and corrected in the April 2009 CU (KB968857). Ironically, the KB was last updated just three days after I used mergecontentdbs and lost our data. Sure do wish something had been discovered sooner than a year and half after initial release. We are now scrambling to avoid insecurity in the stability of the SharePoint product amongst it's users and administrators.

To head off any further conflicts with our users, I would like to scan all of our site collecti

sql server 2008 import/export wizard... completely useless??



import/export wizard in 2000 had lots of options.

I could copy databases without a care in the world. Including constraints, stored proc., AND the data, etc.

Now, with v2008, the wizard is dumbed down too much. It's a "stupid" copy function that fails on the first constraint it meets.

"Copy database.." is not an option here: it needs sysadmin on both source and destination server.

Re-adding the constraints manually is not an option either: the database is WAY too large. 

I'm actually hoping there is a temporary bug in the import/export wizard. Each option (and you have THREE...) returns with a new error.

Googling, I found I am not alone:


This post is exactly my situation. Here's what his post says: (bolded key parts)


I'm trying to get used to sql server 2008 having been forced to upgrade by my isp. I need to back up my key db on a weekly remote schedule, so have been trying to use ssms to export data from my remote db to a local copy.

Firstly I created a new empty db on the local machine. Then I scripted the structure of the db on the remote machine and ran the resulting query on the local machin

To prevent possible data loss before loading the designer, the following errors must be resolved: In

To prevent possible data loss before loading the designer, the following errors must be resolved: The class Form can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file. Move the class code so that it is the first class in the file and try loading the designer again. Instances of this error (1) 1. Hide Call Stack at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager) at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host) Thanks! This post is from Matthew Cenance.

SSIS Import/Export Wizard: "Unexpected Unrecoverable Error"

For whatever reason, whenever the SSIS Import/Export Wizard needs to display an error message, it throws up "Unexpected Unrecoverable Error" instead. The three buttons - Abort, Retry, and Ignore - all cause the wizard to close. I see some activity in Process Monitor that looks like DTSWizard.exe is probing around for some System.Web assemblies, and not finding them. I'm running 2008 SP1 on Win 7 x86, and I've reinstalled the client tools and Integration Services. Anybody else seen this issue? Should I file a report on Connect?

Data Import issues: Access 2003 .mdb to sqlce 3.5 on mobile device

I am trying to download wirelessly or cradled, data from 3 Access 2003 tables into my SQLCE 3.5 datatables. I already have a successful method + web method that uploads data from my sqlce datatables into the Access 2003 tables. I just need feedback to know if I'm headed in the right direction. Web method: Public Function UpdateSqlCeData(ByVal downloadSet As DataSet) As Boolean ' Connect to Access DB here, execute command and populate data set with returned data. Me.Server.ScriptTimeout = 600000 Dim strSql2 As SqlCeCommand Dim oleDbDataset As System.Data.DataSet = New DataSet Dim sqlParam As New SqlCeParameter Dim fhAccDt, fhCeDt As New DataTable strSql2 = Nothing sqlParam = Nothing 'Connection string to connect to access DB Dim FHLiveDB As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\testpre\testservertest.mdb") Dim Pbrd As New OleDb.OleDbDataAdapter("SELECT * FROM tblProductBrand", FHLiveDB) FHLiveDB.Open() Pbrd.Fill(oleDbDataset) With strSql2 .CommandTimeout = 600000 .CommandText = "INSERT INTO Product_Brand ([BrandID],[Brand_Name]) VALUES (@Brand_ID,@Brand_Name)" sqlParam = .Parameters.Add("@Brand_ID", SqlDbType.NVarChar, 50, "Brand_ID&

how to import the data of excel into gridview1 using asp.net/c#

i m having excel file a.xlsi m having gridview1,fileupload1how to import excel file from fileupload1 get the destination of a.xls and show the values in gridview1if any boby knows full code answer/mail me at ponmanivannangj@mobiusservices.in

Wizard Control textbox data is lost

I'm using a wizard contol with several textbox fields. I have two textbox fields disabled (textbox19 and textbox20)because I don't want the user to change the values that are calculated from the other textboxes (see javascript below). I do this with javascript on the clientside. My problem occurs when the user is in STEP2 and goes back to STEP1 the values in the disabled fields are gone. Is there a way to fix this? I would also like to perform a validation on textbox20 but I haven't been able to do that with the textbox disabled. How can I do validations on a field that is disabled? I've tried enabling the fields and using readonly = true but that doesn't work either. Any suggestions? // Client Side script to do calculations <script type="text/javascript">       function calculateSubTotal() {      var txt6 = document.getElementById('<%= TextBox6.ClientID %>');     var txt12 = document.getElementById('<%= TextBox12.ClientID %>');     var txt18 = document.getElementById('<%= TextBox18.ClientID %>');     var txt14 = document.getElementById('<%= TextBox14.ClientID %>');     var txtSubTotal = document.getElementById('<%= TextBox19.Cl

SSRS 2008 Export to PDF fails for large data with System.Exception: Parameter is not valid

Hi, We are working on Range Bar Chart using SSRS 2008. The report has huge data. It is properly displaying the data, but when we tried to export to pdf it is failing with the following exception. Exporting to excel works fine. Also if the report has small/medium data it is property exporting to PDF. It is failing only in case of huge data (we have custom page size of 28" X 14"). Of course the report has lot of expressions we used to customize the colors/text as per our requirements.   Server Error in '/Reports_SQLDEV2008' Application. Parameter is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Exception: Parameter is not valid. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:   [Exception: Parameter is not valid.]   [Exception: An error occurred during rendering of the report.]   [Exception: An error occurred during rendering of the report.]    Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream ou

User Profiles Service Application and Import of SharePoint 2007 SSP data

I have setup a test SharePoint 2010 Farm. I will be using this as a test upgrade of a current live SharePoint 2007 Farm. The database attach method will be used. I have replicated the web application and AAM settings of the SharePoint 2007 Farm to the SharePoint 2010 Farm and have made the 2010 Farm a DC in a new Forest. I don't want to join this to the current domain at the moment. It also has SQL server 2005 with SP3 and cumulative update 3 installed. I have just setup the User Profiles Serice Application and when I go to Manage it, I get this. Error An unexpected error has occurred.   Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: a1760e87-372f-4711-afac-3ceba34bc599 Date and Time: 8/31/2010 4:22:56 PM I have verified and configured the following. Created the Managed Metadata Service. The status is started via Service Applications and Services on Server. Created the User Profiles Service Application and ensured status is started via Service Applications. I started the User Profile Service and User Profile Synchronisation Service via Manage Services on Server.      

Why are there inconsistencies regarding data loss between subscribers on WAN vs. LAN links?

There are 6 subscribers, some of which communicate through a WAN (slow) link and some on a LAN (fast) connection to the distributor. An article on the publisher is filled with 13 million rows inserted via 13,000 separate transactions. For the next couple of hours the following events occurred and status was verified. 1.     The log reader was able to post commands into the distribution database without issue. We could see the commands posted for the 13 million rows inserted via 13,000 separate transactions. 2.     The distribution database was altered adding another data file to counter an impending drive space issue.  3.     More data modifications were made to other articles and new articles were added to the publication. After a couple of more hours the following events occurred and status was verified. 1.     Subscribers on LAN links were missing part of the data from the 13 million rows inserted via 13,000 separate transactions data modification (#1 above list) and other data was missing from more data modifications made to other articles (#3 above list). 2.     Subscribers on WAN links were NOT missing any of the data modifications. The current hypothesizes are… 1.     The distribution agent read and executed commands from the d

SharePoint configuration wizard fails at 9 th step after installation of KB961749 on MOSS2007 SP1 se

Hi,   System details: 2003 enterprise OS, 2005 SQL server, SharePoint 2007 SP1 with version. Now i m trying to install KB961749 (February 24, 2009 Cumulative Update), installation completed successfully after this while running SharePoint configuration wizard its failed at 9th (last step) in the wizard. Share point version also not updated after this. i tried to upgrade through psconfig command line also, same result. failed at 4th step. Logs gives below info: Not running in high contrast, so we will paint the background with our trademarked image 09/02/2010 14:21:24  11  ERR                      The B2B upgrader timer job failed. Resource retrieved id UpgradeTaskFailConfigSyncDisplayLabel is Failed to upgrade SharePoint Products and Technologies.  Task upgrade has failed with a PostSetupConfigurationTaskException An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown.  Additional exception information: Failed to upgrade SharePoint Products and Technologies. Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown.  Additional exception information: Failed to upgrade SharePoint Products and Technologies. Microsoft.SharePoint.PostSetupConfigur

Import Excel data into SQL Server express 2008

I have recently installed SQL express 08 and created a table to import excel data into.  Im running on a windows 7 64 bit OS i5 processor.  I've disabled the firewall (temporarily) and will set the necessary ports once this is working. I run the following query:  (which i found from multiple sources on the net) Select   * From OPENROWSET ( 'Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\Users\Public\lenovoBkup\contacts\outlookFiles\noib2a.xls', 'Select * From [sheet1$]' )  and receive the following message: Msg 7308, Level 16, State 1, Line 1                                                                                  OLE DB provider 'Microsoft.Jet.OLEDB.4.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.  (how did they know i was single and living in an apartment? lol) so after research of the following message i restarted the system and relaunched man

Socket receiving Data Loss

Hi Friends,   I have a Real Time Client/server application which should process received data and send back result with in milliseconds.Application is working fine when it runs in normal load. During my testing phase i tested by sending 100 message to clients in One seconds, But Client Application will only process 40 message , But sever will send all 100 message to clients. I would like to know Is there any DATA LOSS occurring in Client Side. Here is the code i wrote to receive data from sever. Private Sub sockDataArrival(ByVal ar As IAsyncResult) Dim state As StateObject = CType(ar.AsyncState, StateObject) Dim client As Socket = state.workSocket Dim bytesRead As Integer Try bytesRead = client.EndReceive(ar) Catch Exit Sub End Try Try Dim Data() As Byte = state.buffer If bytesRead = 0 Then client.Shutdown(SocketShutdown.Both) client.Close() RaiseEvent onDisconnect() Exit Sub End If ReDim state.buffer(50000) client.BeginReceive(state.buffer, 0, state.BufferSize, 0, AddressOf sockDataArrival, state) RaiseEvent onDataArrival(Data, bytesRead) Catch RaiseEvent onError(Err.Description) Exit Sub End Try End Sub Any Idea about this.....?  Dheeraj PK http://dheerajpk.spaces.live.com/default.aspx

Import data without duplicating

Gooday How can i import names into a data column using sql managment studio but without duplicating the names . thanks robrh

SSRS 2008 R2 Data Source View Wizard does not recognize unique key constraints on views when using O

Hi, SSRS Data Source View Wizard does recongnize Primary/Foreign Key relationships from oracle datasouce tables, but does not recognize unique key constraints on views. How can I solve this problem. Thanks

TableAdapter wizard not giving me choice for tabular data, also ObjectDataSource config wizard not g

Hello, I was wondering if someone could help me with this problem. First of all, I created my own stored procedure in SQL Server for my aspnetdb database which is :USE [C:\USERS\DAVE\DESKTOP\AUG 19 NEW ONE\APP_DATA\ASPNETDB.MDF] GO CREATE PROCEDURE [dbo].[aspnet_GetNotifications] ( @UserName nvarchar(256) ) AS SELECT UserName,UserNotification,UserNotificationDate FROM UserNotifications WHERE UserName=@UserNameSo, the procedure gets everything from the UserNotifications table, except the RecordID(primary key) which is not needed for display.Now I have set up my BLL and DAL, and everything is working fine, in my DAL, I have the tableadapter and it is called PersonalRecordEntries.xsd in which I have added queries to it using existing stored procedures. Such as :GetLastRecordEntryDate(@UserName) which returns one value which of course is the last record entry date.InsertRecord(@UserName,@TDEE,@BMI,@FTM) which does not return any values, it only inserts a record.AND LASTLYGetNotifications(@UserName) which is supposed to return UserName, UserNotification and UserNotificationDate ( I just realized I can also get rid of having to return UserName but whatever)Now problem #1 ( never had problem with other queries because they did not return more than one value) is that when I add the query to QueriesTableAdapter in design mode and use existing stored procedure, and go through all t
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend