dbTalk Databases Forums  

Incomplete File Format Info for Import

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Incomplete File Format Info for Import in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
TomTait747
 
Posts: n/a

Default Incomplete File Format Info for Import - 07-14-2004 , 02:53 PM






This is a "repost" continuing where a post left off. The subject has changed. The original post was "bas file does nothing".
I get the following error when executing a package from vb script:
Source: Microsoft Data Transformation Services Flat File Rowset Provider
Description: Incomplete file format information - file cannot be opened.

Darren wrote:
Flat File Rowset Provider is the text file driver, so that is the error
source basically. Sounds like something if wrong in that area, or just missing
information, maybe a record terminator.

Then I wrote:
Darrel, this is not all that surprising. The record terminator is a pipe + a return character that appears as a square in notepad. It translates to chr(10) in visual basic. I can't get bulk copy to recognized it to save my life, which is why I'm trying to make it happen with DTS. MS Access can deal with it. DTS has no problem with the file when I run the local package from within Enterprise manager. Why does it cough when I run it from the VB script? (The vb script was created when I saved the package as visual basic from the DTS wizard.) Also, is there a spot in the code where I can define the record terminator?...I could not find one in the bas that Ent Mgr created.


Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Incomplete File Format Info for Import - 07-14-2004 , 04:13 PM






In message <15D4EB38-8600-4B7B-9C5A-30E52D6FC4B1 (AT) microsoft (DOT) com>,
TomTait747 <TomTait747 (AT) discussions (DOT) microsoft.com> writes
Quote:
This is a "repost" continuing where a post left off. The subject has
changed. The original post was "bas file does nothing".
I get the following error when executing a package from vb script:
Source: Microsoft Data Transformation Services Flat File Rowset Provider
Description: Incomplete file format information - file cannot be opened.

Darren wrote:
Flat File Rowset Provider is the text file driver, so that is the error
source basically. Sounds like something if wrong in that area, or just missing
information, maybe a record terminator.

Then I wrote:
Darrel, this is not all that surprising. The record terminator is a
pipe + a return character that appears as a square in notepad. It
translates to chr(10) in visual basic. I can't get bulk copy to
recognized it to save my life, which is why I'm trying to make it
happen with DTS. MS Access can deal with it. DTS has no problem with
the file when I run the local package from within Enterprise manager.
Why does it cough when I run it from the VB script? (The vb script was
created when I saved the package as visual basic from the DTS wizard.)
Also, is there a spot in the code where I can define the record
terminator?...I could not find one in the bas that Ent Mgr created.


I think the key is "there a spot in the code", if this spot is supposed
to be the Chr(10), then you will need to code it as such, as in

Propert.Value = Chr(10) + "|"

I assume the scripting method just takes the delimiter value and wraps
it in quotes, without checking that the delimiter is indeed a printable
character.



--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #3  
Old   
Darren Green
 
Posts: n/a

Default Re: Incomplete File Format Info for Import - 07-14-2004 , 05:00 PM



In message <AD8BD6CB-B808-4BDC-B8B5-C6160B9A075E (AT) microsoft (DOT) com>,
TomTait747 <TomTait747 (AT) discussions (DOT) microsoft.com> writes
Quote:
What would be the line item in the code to do this? For example, thel
line item for the column delimiter is:
oConnection.ConnectionProperties("Column Delimiter") = "|"

Without SQL 2000 to hand I assume -

oConnection.ConnectionProperties("Row Delimiter") = Chr(10)

Have a look where the so called spot is, as that is probably the Chr(10)
incorrectly displayed.




Quote:
"Darren Green" wrote:

In message <15D4EB38-8600-4B7B-9C5A-30E52D6FC4B1 (AT) microsoft (DOT) com>,
TomTait747 <TomTait747 (AT) discussions (DOT) microsoft.com> writes
This is a "repost" continuing where a post left off. The subject has
changed. The original post was "bas file does nothing".
I get the following error when executing a package from vb script:
Source: Microsoft Data Transformation Services Flat File Rowset Provider
Description: Incomplete file format information - file cannot be opened.

Darren wrote:
Flat File Rowset Provider is the text file driver, so that is the error
source basically. Sounds like something if wrong in that area, or
just missing
information, maybe a record terminator.

Then I wrote:
Darrel, this is not all that surprising. The record terminator is a
pipe + a return character that appears as a square in notepad. It
translates to chr(10) in visual basic. I can't get bulk copy to
recognized it to save my life, which is why I'm trying to make it
happen with DTS. MS Access can deal with it. DTS has no problem with
the file when I run the local package from within Enterprise manager.
Why does it cough when I run it from the VB script? (The vb script was
created when I saved the package as visual basic from the DTS wizard.)
Also, is there a spot in the code where I can define the record
terminator?...I could not find one in the bas that Ent Mgr created.



I think the key is "there a spot in the code", if this spot is supposed
to be the Chr(10), then you will need to code it as such, as in

Propert.Value = Chr(10) + "|"

I assume the scripting method just takes the delimiter value and wraps
it in quotes, without checking that the delimiter is indeed a printable
character.



--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #4  
Old   
TomTait747
 
Posts: n/a

Default Re: Incomplete File Format Info for Import - 07-14-2004 , 06:59 PM



I've been having all of these troubles because when the files were ftp-ed from unix, it was done in binary. So the line delimiter was a line feed only. In windows, it needs to be a carriage return (chr(13)) + a line feed (chr(10)). It should be easier from here on out, although I will have more questions I'm sure.

"Darren Green" wrote:

Quote:
In message <AD8BD6CB-B808-4BDC-B8B5-C6160B9A075E (AT) microsoft (DOT) com>,
TomTait747 <TomTait747 (AT) discussions (DOT) microsoft.com> writes
What would be the line item in the code to do this? For example, thel
line item for the column delimiter is:
oConnection.ConnectionProperties("Column Delimiter") = "|"

Without SQL 2000 to hand I assume -

oConnection.ConnectionProperties("Row Delimiter") = Chr(10)

Have a look where the so called spot is, as that is probably the Chr(10)
incorrectly displayed.




"Darren Green" wrote:

In message <15D4EB38-8600-4B7B-9C5A-30E52D6FC4B1 (AT) microsoft (DOT) com>,
TomTait747 <TomTait747 (AT) discussions (DOT) microsoft.com> writes
This is a "repost" continuing where a post left off. The subject has
changed. The original post was "bas file does nothing".
I get the following error when executing a package from vb script:
Source: Microsoft Data Transformation Services Flat File Rowset Provider
Description: Incomplete file format information - file cannot be opened.

Darren wrote:
Flat File Rowset Provider is the text file driver, so that is the error
source basically. Sounds like something if wrong in that area, or
just missing
information, maybe a record terminator.

Then I wrote:
Darrel, this is not all that surprising. The record terminator is a
pipe + a return character that appears as a square in notepad. It
translates to chr(10) in visual basic. I can't get bulk copy to
recognized it to save my life, which is why I'm trying to make it
happen with DTS. MS Access can deal with it. DTS has no problem with
the file when I run the local package from within Enterprise manager.
Why does it cough when I run it from the VB script? (The vb script was
created when I saved the package as visual basic from the DTS wizard.)
Also, is there a spot in the code where I can define the record
terminator?...I could not find one in the bas that Ent Mgr created.



I think the key is "there a spot in the code", if this spot is supposed
to be the Chr(10), then you will need to code it as such, as in

Propert.Value = Chr(10) + "|"

I assume the scripting method just takes the delimiter value and wraps
it in quotes, without checking that the delimiter is indeed a printable
character.



--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #5  
Old   
Darren Green
 
Posts: n/a

Default Re: Incomplete File Format Info for Import - 07-15-2004 , 04:19 AM



I misread one of your earlier posts, so to clarify, when saving as VB from
the designer, is you use Cr+Lf or a normal printable character then you will
see something like this-

oConnection.ConnectionProperties("Mode") = 1
oConnection.ConnectionProperties("Row Delimiter") = vbCrLf
oConnection.ConnectionProperties("File Format") = 1

If you use Cr or Lf or another non-printable character it looks like this-

oConnection.ConnectionProperties("Mode") = 1

oConnection.ConnectionProperties("File Format") = 1

Note the missing Row Delimiter line, so just add it back, e.g.

oConnection.ConnectionProperties("Mode") = 1
oConnection.ConnectionProperties("Row Delimiter") = Chr(10)
oConnection.ConnectionProperties("File Format") = 1


--
Darren Green
http://www.sqldts.com

"TomTait747" <TomTait747 (AT) discussions (DOT) microsoft.com> wrote

Quote:
I've looked at and around the spot to no avail. It isn't displayed at
all. My mission just got a lot tougher. I need to automate the importation
of these files every half hour. I have basically nothing in SQL Server:
View, Tables, DTS-wizard-created packages, T-SQL, BCP. I assume I need to
schedule some jobs and feed a file path to a DTS package to import the file.
Where should I start?
Quote:
"Darren Green" wrote:

In message <AD8BD6CB-B808-4BDC-B8B5-C6160B9A075E (AT) microsoft (DOT) com>,
TomTait747 <TomTait747 (AT) discussions (DOT) microsoft.com> writes
What would be the line item in the code to do this? For example, thel
line item for the column delimiter is:
oConnection.ConnectionProperties("Column Delimiter") = "|"

Without SQL 2000 to hand I assume -

oConnection.ConnectionProperties("Row Delimiter") = Chr(10)

Have a look where the so called spot is, as that is probably the Chr(10)
incorrectly displayed.




"Darren Green" wrote:

In message <15D4EB38-8600-4B7B-9C5A-30E52D6FC4B1 (AT) microsoft (DOT) com>,
TomTait747 <TomTait747 (AT) discussions (DOT) microsoft.com> writes
This is a "repost" continuing where a post left off. The subject
has
changed. The original post was "bas file does nothing".
I get the following error when executing a package from vb script:
Source: Microsoft Data Transformation Services Flat File Rowset
Provider
Description: Incomplete file format information - file cannot be
opened.

Darren wrote:
Flat File Rowset Provider is the text file driver, so that is the
error
source basically. Sounds like something if wrong in that area, or
just missing
information, maybe a record terminator.

Then I wrote:
Darrel, this is not all that surprising. The record terminator is a
pipe + a return character that appears as a square in notepad. It
translates to chr(10) in visual basic. I can't get bulk copy to
recognized it to save my life, which is why I'm trying to make it
happen with DTS. MS Access can deal with it. DTS has no problem
with
the file when I run the local package from within Enterprise
manager.
Why does it cough when I run it from the VB script? (The vb script
was
created when I saved the package as visual basic from the DTS
wizard.)
Also, is there a spot in the code where I can define the record
terminator?...I could not find one in the bas that Ent Mgr created.



I think the key is "there a spot in the code", if this spot is
supposed
to be the Chr(10), then you will need to code it as such, as in

Propert.Value = Chr(10) + "|"

I assume the scripting method just takes the delimiter value and
wraps
it in quotes, without checking that the delimiter is indeed a
printable
character.



--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.