Re: Simple Bulk Insert Problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tom Moreau (tom_at_dont.spam.me.cips.ca)
Date: 01/02/05


Date: Sun, 2 Jan 2005 07:57:32 -0500

This may help:

http://msdn.microsoft.com/SQL/sqlreldata/XML/default.aspx?pull=/library/en-us/dnsql90/html/exchsqlxml.asp

If you don't have .NET, them search the MSDN website for SQLXML.

-- 
   Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON   Canada
www.pinnaclepublishing.com
.
"Nickl" <Nickl@discussions.microsoft.com> wrote in message 
news:43A132FA-AC83-41BB-84B5-F43CFF39AB70@microsoft.com...
I would like to retrieve all the text in a file into one field in a table 
(or
preferabally one local variable in a stored procedure). The text is an XML
string and the stored procedure will deal with it (split it back into
relational format, and this part is working fine).
How do I simply copy/insert the complete string. I have tried this;
BULK INSERT dbo.tblXMLTest
   FROM 'C:\XML\Contracts.xml'
And I receive this error in QA;
Server: Msg 4832, Level 16, State 1, Line 1
Bulk Insert: Unexpected end-of-file (EOF) encountered in data file.
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'STREAM' reported an error. The provider did not give any
information about the error.
The statement has been terminated.
The XML string is just a long string, though it does have line breaks
entered after some tags. So I don't think I need to specify FIELDTERMINATOR
or         ROWTERMINATOR delimiters.
Thanks for any help.
Nick Lindner


Relevant Pages

  • Re: Linking tables access - sql server 2005
    ... Another advantage of this method is that you don't need an ODBC setting on the local computer, ... Create a linked table to SQL Server without using a DSN ... Name of the table that you are linking to on the SQL Server database ... Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Cannot Generate SSPI Context - help
    ... I have used the following DSN-less string: ... Microsoft OLE DB Provider for SQL Server error '80004005' ... When a connection is "trusted," it means ... > How would one connect to a remote SQL Server using Windows authen? ...
    (microsoft.public.inetserver.asp.db)
  • Re: INSERT Query problem with Quotes & Apostrophes
    ... I've got front-ends that go against both Jet and SQL Server databases. ... InputText As String, _ ... >> Delimiter, Delimiter & Delimiter) ... dDateTime, ...
    (microsoft.public.access.modulesdaovba)
  • Re: ADO.NET 2.0 saving single space to SQL?
    ... It is code someone else wrote quite some time ago and all of the string ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: using OpenXML in T-sql?
    ... am not the most senior person in sql server programming, ... especially xml stuff. ... style string in place of an array without the additional ... >delimited strings and opts for the xml string instead. ...
    (microsoft.public.sqlserver.programming)