473,396 Members | 1,755 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,396 software developers and data experts.

Bulk Import... second Try...

Hi,

Does some one here know how to trigger export(bulk/non bulk) and use bulk
import without having to manually edit the Xsd file before import. BTW I am
assuming that XML is the correct choice as I want to save these data in my
VSS for future after export.

======================================
My prev Post:

I want to back up my data in some table in SQL server and import it back
using Bulk Load of SQL server 2K.

I can use the following code to backup the data in XML

dataset.WriteXml(@"C:\Data.xml");
dataset.WriteXmlSchema(@"C:\Schema1.xml");

and following code to bulk import the same data

SQLXMLBULKLOADLib.SQLXMLBulkLoad3 x = new
SQLXMLBULKLOADLib.SQLXMLBulkLoad3Class();
x.ConnectionString
="PROVIDER=SQLOLEDB.1;SERVER=localhost;UID=sa;PWD= ;DATABASE=demo01";
x.XMLFragment = true;
x.ErrorLogFile = @"c:\error.txt";
x.SchemaGen = true;
x.SGDropTables = true;
x.Execute(@"C:\Schema.xml",@"C:\data.xml");

this do not work, but do not throw any error either, when I looked
closely... the format of the schema file is incorrect, if I create a correct
formate maually it works.

Does some one know how to generate schema file in correct format? using
..Net.

Regards
Kiran


Nov 16 '05 #1
0 1472

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: akej via SQLMonster.com | last post by:
Hi, i have table with 15 columns CREATE TABLE . ( PRIMARY KEY , NULL , NULL , NULL , NULL , (50) NULL , NULL
4
by: Mike | last post by:
I am getting a type mismatch error when I do a bulk insert. ---Begin Error Msg--- Server: Msg 4864, Level 16, State 1, Line 1 Bulk insert data conversion error (type mismatch) for row 1, column...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
3
by: Davy B | last post by:
I am trying to import a data file, which is tab delimited, using BULK INSERT. I have used BCP to create a format file, since the destination table has around 20 columns, but the data file has only...
11
by: Ted | last post by:
OK, I tried this: USE Alert_db; BULK INSERT funds FROM 'C:\\data\\myData.dat' WITH (FIELDTERMINATOR='\t', KEEPNULLS, ROWTERMINATOR='\r\n');
3
by: Davor | last post by:
I'm trying to import data from flat file in table and have few problems. 1. Field Delimiter is ',' (comma). If ',' occurs in quoted string it is still treated as field delimiter. This is BUG or...
1
by: planetmatt | last post by:
I need to create a page that bulk inserts a CSV text file into SQL Server. I have plenty of experience with SQL Server and have built some web apps with classic ASP but have never used ASP.NET...
2
by: fperri | last post by:
I am using SQL Server 2005 and SQL Server Management Studio Express. I'm new to stored procedures and I was creating this one to test out the BULK INSERT sql command. When I execute it says...
3
by: akdemirc | last post by:
i have a problem with large data import to a db in sql server.. Actually i have an application that collects data from an environment and dispatches this data to different csv files for sql server to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.