none
Сохраниение из кодировки 866 RRS feed

  • Вопрос

  • При сохранении из плоского файла (в кодировке 866) в базу данный sql server 2005 я указываю кодировку 866 в общих настройках в диспетчере соединения с плоским файлом. После этого при попытке запуска выдается ошибка "Обработка столбца ____ невозможна, так как для него указано более одной кодовой страницы (866 и 1251)". Хотя везде указана только одна кодировка. Кто-нибуть знает, в чем дело?
    1 февраля 2007 г. 11:02

Ответы

  • В свойствах получателя (oledb, или sql server) поставь:

    default code page 866, always use default code page = true

    У меня только что сработало :)

    зы Просьба нажать "отметить как ответ".

     

    1 февраля 2007 г. 13:32
  • Можно использовать формат-файл, а, кроме того, никто не мешает выгружать данные запросом, в котором явно указать конвертацию в другой колашн...
    2 февраля 2007 г. 7:37
  •  Данила Полевщиков написано:

    А запустить dtsx-пакет, открытый с диска, вообще нельзя :)

    Открытый в Visual Studio, вне контекста проекта? Увы, нельзя, так же как нельзя открыть отдельный C# или С++ файл вне проекта, и запустить его на отладку.

    Для этого есть DtExecUI - он и запускается по умолчанию по двойному щелчку на .dtsx файлах.

    9 февраля 2007 г. 23:51

Все ответы

  • А в таблице, куда всё переливается, смотрели collation на том самом столбике? Collation может быть у базы, у таблицы, у колонки - свой.
    1 февраля 2007 г. 11:41
  • Да, похоже дело именно в этом. Но в списе нет кодовой таблицы 866.  Можно как то это решить без преобразования файла?
    1 февраля 2007 г. 12:15
  • В свойствах получателя (oledb, или sql server) поставь:

    default code page 866, always use default code page = true

    У меня только что сработало :)

    зы Просьба нажать "отметить как ответ".

     

    1 февраля 2007 г. 13:32
  • Теперь данные переносятся в базу, но при этом отображаются не правильно, думаю из-за того, что в базе по умолчанию стоит кодировка 1251, а 866 нет. Нельзя как то ее добавить?
    1 февраля 2007 г. 14:09
  •  Данила Полевщиков написано:

    зы Просьба нажать "отметить как ответ".

    Придется тебе сперва ответить и на дополнительный вопрос :) :)

    2 февраля 2007 г. 3:35
  •  Jоker написано:
     Данила Полевщиков написано:

    зы Просьба нажать "отметить как ответ".

    Придется тебе сперва ответить и на дополнительный вопрос :) :)

    Ответил

    2 февраля 2007 г. 6:13
  • Можно использовать формат-файл, а, кроме того, никто не мешает выгружать данные запросом, в котором явно указать конвертацию в другой колашн...
    2 февраля 2007 г. 7:37
  • Я у меня всё работает, всё показывается. Collation унаследован от базы, SQL_Latin1_General_CP1251_CI_AS

    Вот создание таблицы:

    CREATE TABLE [dbo].[test](

    [Column 0] [varchar](50)  NULL,

    [Column 1] [varchar](50) NULL,

    [Column 2] [varchar](50) NULL

    ) ON [PRIMARY]

    Вот файлик (разделитель табуляция, 866)

    раз два три
    раз1 два1 три1
    раз2 два2 три2

    Вот пакет:

    <?xml version="1.0"?><DTS:Executable xmlns:DTS="www.microsoft.com/SqlServer/Dts" DTS:ExecutableType="MSDTS.Package.1"><DTS:Property DTS:Name="PackageFormatVersion">2</DTS:Property><DTS:Property DTS:Name="VersionComments"></DTS:Property><DTS:Property DTS:Name="CreatorName">FANTOM\Admin</DTS:Property><DTS:Property DTS:Name="CreatorComputerName">FANTOM</DTS:Property><DTS:Property DTS:Name="CreationDate" DTS:DataType="7">2/1/2007 4:04:52 PM</DTS:Property><DTS:Property DTS:Name="PackageType">5</DTS:Property><DTS:Property DTS:Name="ProtectionLevel">1</DTS:Property><DTS:Property DTS:Name="MaxConcurrentExecutables">-1</DTS:Property><DTS:Property DTS:Name="PackagePriorityClass">0</DTS:Property><DTS:Property DTS:Name="VersionMajor">1</DTS:Property><DTS:Property DTS:Name="VersionMinor">0</DTS:Property><DTS:Property DTS:Name="VersionBuild">11</DTS:Property><DTS:Property DTS:Name="VersionGUID">{5F5A864B-F460-4BEF-A246-ADA876B5E9F0}</DTS:Property><DTS:Property DTS:Name="EnableConfig">0</DTS:Property><DTS:Property DTS:Name="CheckpointFileName"></DTS:Property><DTS:Property DTS:Name="SaveCheckpoints">0</DTS:Property><DTS:Property DTS:Name="CheckpointUsage">0</DTS:Property><DTS:Property DTS:Name="SuppressConfigurationWarnings">0</DTS:Property>
    <DTS:ConnectionManager><DTS:Property DTS:Name="DelayValidation">0</DTS:Property><DTS:Property DTS:Name="ObjectName">fantom\fepo.fepo</DTS:Property><DTS:Property DTS:Name="DTSID">{8DE8F720-5485-4A75-95D3-C1E444D30FC9}</DTS:Property><DTS:Property DTS:Name="Description"></DTS:Property><DTS:Property DTS:Name="CreationName">OLEDB</DTS:Property><DTS:ObjectData><DTS:ConnectionManager><DTS:Property DTS:Name="Retain">0</DTS:Property><DTS:Property DTS:Name="ConnectionString">Data Source=fantom\fepo;Initial Catalog=fepo;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;</DTS:Property></DTS:ConnectionManager></DTS:ObjectData></DTS:ConnectionManager>
    <DTS:ConnectionManager><DTS:Property DTS:Name="DelayValidation">0</DTS:Property><DTS:Property DTS:Name="ObjectName">test</DTS:Property><DTS:Property DTS:Name="DTSID">{EB9C3580-E0FA-49DC-A78C-170FBF1C8E0A}</DTS:Property><DTS:Property DTS:Name="Description">test</DTS:Property><DTS:Property DTS:Name="CreationName">FLATFILE</DTS:Property><DTS:ObjectData><DTS:ConnectionManager><DTS:Property DTS:Name="FileUsageType">0</DTS:Property><DTS:Property DTS:Name="Format">Delimited</DTS:Property><DTS:Property DTS:Name="LocaleID">1049</DTS:Property><DTS:Property DTS:Name="Unicode">0</DTS:Property><DTS:Property DTS:Name="HeaderRowsToSkip">0</DTS:Property><DTS:Property DTS:Name="HeaderRowDelimiter" xml:space="preserve">_x000D__x000A_</DTS:Property><DTS:Property DTS:Name="ColumnNamesInFirstDataRow">0</DTS:Property><DTS:Property DTS:Name="RowDelimiter" xml:space="preserve"></DTS:Property><DTS:Property DTS:Name="DataRowsToSkip">0</DTS:Property><DTS:Property DTS:Name="TextQualifier">&lt;none&gt;</DTS:Property><DTS:Property DTS:Name="CodePage">866</DTS:Property>
    <DTS:FlatFileColumn><DTS:Property DTS:Name="ColumnType">Delimited</DTS:Property><DTS:Property DTS:Name="ColumnDelimiter" xml:space="preserve">_x0009_</DTS:Property><DTS:Property DTS:Name="ColumnWidth">0</DTS:Property><DTS:Property DTS:Name="MaximumWidth">50</DTS:Property><DTS:Property DTS:Name="DataType">129</DTS:Property><DTS:Property DTS:Name="DataPrecision">0</DTS:Property><DTS:Property DTS:Name="DataScale">0</DTS:Property><DTS:Property DTS:Name="TextQualified">-1</DTS:Property><DTS:Property DTS:Name="ObjectName">Column 0</DTS:Property><DTS:Property DTS:Name="DTSID">{828D5C00-16DB-4EF4-AB50-F4C1FEB9C54C}</DTS:Property><DTS:Property DTS:Name="Description"></DTS:Property><DTS:Property DTS:Name="CreationName"></DTS:Property></DTS:FlatFileColumn>
    <DTS:FlatFileColumn><DTS:Property DTS:Name="ColumnType">Delimited</DTS:Property><DTS:Property DTS:Name="ColumnDelimiter" xml:space="preserve">_x0009_</DTS:Property><DTS:Property DTS:Name="ColumnWidth">0</DTS:Property><DTS:Property DTS:Name="MaximumWidth">50</DTS:Property><DTS:Property DTS:Name="DataType">129</DTS:Property><DTS:Property DTS:Name="DataPrecision">0</DTS:Property><DTS:Property DTS:Name="DataScale">0</DTS:Property><DTS:Property DTS:Name="TextQualified">-1</DTS:Property><DTS:Property DTS:Name="ObjectName">Column 1</DTS:Property><DTS:Property DTS:Name="DTSID">{A8BC2A94-04E7-4F94-A513-C7FEF81576E6}</DTS:Property><DTS:Property DTS:Name="Description"></DTS:Property><DTS:Property DTS:Name="CreationName"></DTS:Property></DTS:FlatFileColumn>
    <DTS:FlatFileColumn><DTS:Property DTS:Name="ColumnType">Delimited</DTS:Property><DTS:Property DTS:Name="ColumnDelimiter" xml:space="preserve">_x000D__x000A_</DTS:Property><DTS:Property DTS:Name="ColumnWidth">0</DTS:Property><DTS:Property DTS:Name="MaximumWidth">50</DTS:Property><DTS:Property DTS:Name="DataType">129</DTS:Property><DTS:Property DTS:Name="DataPrecision">0</DTS:Property><DTS:Property DTS:Name="DataScale">0</DTS:Property><DTS:Property DTS:Name="TextQualified">-1</DTS:Property><DTS:Property DTS:Name="ObjectName">Column 2</DTS:Property><DTS:Property DTS:Name="DTSID">{E01F15D1-D399-46EA-AC13-F76DE71AA497}</DTS:Property><DTS:Property DTS:Name="Description"></DTS:Property><DTS:Property DTS:Name="CreationName"></DTS:Property></DTS:FlatFileColumn><DTS:Property DTS:Name="ConnectionString">c:\1.txt</DTS:Property></DTS:ConnectionManager></DTS:ObjectData></DTS:ConnectionManager>
    <DTS:PackageVariable><DTS:Property DTS:Name="PackageVariableValue" DTS:DataType="8">&lt;TaskHost xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0"&gt;&lt;dwd:DtsDataFlowDiagram&gt;&lt;dwd:BoundingTop&gt;1000&lt;/dwd:BoundingTop&gt;&lt;dwd:Layout&gt;&lt;dds&gt;
      &lt;diagram fontclsid="{0BE35203-8F91-11CE-9DE3-00AA004BB851}" mouseiconclsid="{0BE35204-8F91-11CE-9DE3-00AA004BB851}" defaultlayout="Microsoft.DataWarehouse.Layout.GraphLayout" defaultlineroute="Microsoft.DataWarehouse.Layout.GraphLayout" version="7" nextobject="11" scale="100" pagebreakanchorx="0" pagebreakanchory="0" pagebreaksizex="0" pagebreaksizey="0" scrollleft="0" scrolltop="0" gridx="150" gridy="150" marginx="1000" marginy="1000" zoom="100" x="14711" y="18600" backcolor="15334399" defaultpersistence="2" PrintPageNumbersMode="3" PrintMarginTop="0" PrintMarginBottom="635" PrintMarginLeft="0" PrintMarginRight="0" marqueeselectionmode="1" mousepointer="0" snaptogrid="0" autotypeannotation="1" showscrollbars="0" viewpagebreaks="0" donotforceconnectorsbehindshapes="0" backpictureclsid="{00000000-0000-0000-0000-000000000000}"&gt;
        &lt;font&gt;
          &lt;ddsxmlobjectstreamwrapper binary="01010000900180380100065461686f6d61" /&gt;
        &lt;/font&gt;
        &lt;mouseicon&gt;
          &lt;ddsxmlobjectstreamwrapper binary="6c74000000000000" /&gt;
        &lt;/mouseicon&gt;
      &lt;/diagram&gt;
      &lt;layoutmanager&gt;
        &lt;ddsxmlobj /&gt;
      &lt;/layoutmanager&gt;
      &lt;ddscontrol controlprogid="DdsShapes.DdsObjectManagedBridge.1" tooltip="Flat File Source" left="371" top="4921" logicalid="4" controlid="1" masterid="0" hint1="0" hint2="0" width="3598" height="1164" noresize="0" nomove="0" nodefaultattachpoints="0" autodrag="1" usedefaultiddshape="1" selectable="1" showselectionhandles="1" allownudging="1" isannotation="0" dontautolayout="0" groupcollapsed="0" tabstop="1" visible="1" snaptogrid="0"&gt;
        &lt;control&gt;
          &lt;ddsxmlobjectstreaminitwrapper binary="000800000e0e00008c040000" /&gt;
        &lt;/control&gt;
        &lt;layoutobject&gt;
          &lt;ddsxmlobj&gt;
            &lt;property name="LogicalObject" value="{B5979C92-2E58-45F5-A681-101ECC593D0F}/components/1" vartype="8" /&gt;
            &lt;property name="ShowConnectorSource" value="0" vartype="2" /&gt;
          &lt;/ddsxmlobj&gt;
        &lt;/layoutobject&gt;
        &lt;shape groupshapeid="0" groupnode="0" /&gt;
      &lt;/ddscontrol&gt;
      &lt;ddscontrol controlprogid="DdsShapes.DdsObjectManagedBridge.1" tooltip="SQL Server Destination" left="0" top="9657" logicalid="5" controlid="2" masterid="0" hint1="0" hint2="0" width="3598" height="1164" noresize="0" nomove="0" nodefaultattachpoints="0" autodrag="1" usedefaultiddshape="1" selectable="1" showselectionhandles="1" allownudging="1" isannotation="0" dontautolayout="0" groupcollapsed="0" tabstop="1" visible="1" snaptogrid="0"&gt;
        &lt;control&gt;
          &lt;ddsxmlobjectstreaminitwrapper binary="000800000e0e00008c040000" /&gt;
        &lt;/control&gt;
        &lt;layoutobject&gt;
          &lt;ddsxmlobj&gt;
            &lt;property name="LogicalObject" value="{B5979C92-2E58-45F5-A681-101ECC593D0F}/components/192" vartype="8" /&gt;
            &lt;property name="ShowConnectorSource" value="0" vartype="2" /&gt;
          &lt;/ddsxmlobj&gt;
        &lt;/layoutobject&gt;
        &lt;shape groupshapeid="0" groupnode="0" /&gt;
      &lt;/ddscontrol&gt;
      &lt;ddscontrol controlprogid="MSDDS.Polyline" left="1400" top="5686" logicalid="6" controlid="3" masterid="0" hint1="0" hint2="0" width="1170" height="4471" noresize="0" nomove="0" nodefaultattachpoints="1" autodrag="0" usedefaultiddshape="0" selectable="1" showselectionhandles="0" allownudging="1" isannotation="0" dontautolayout="0" groupcollapsed="0" tabstop="1" visible="1" snaptogrid="0"&gt;
        &lt;control&gt;
          &lt;ddsxmlobj&gt;
            &lt;polyline endtypedst="3" endtypesrc="1" usercolor="32768" linestyle="0" linerender="1" customendtypedstid="0" customendtypesrcid="0" adornsvisible="1" /&gt;
          &lt;/ddsxmlobj&gt;
        &lt;/control&gt;
        &lt;layoutobject&gt;
          &lt;ddsxmlobj&gt;
            &lt;property name="LogicalObject" value="{B5979C92-2E58-45F5-A681-101ECC593D0F}/paths/229" vartype="8" /&gt;
            &lt;property name="Virtual" value="0" vartype="11" /&gt;
            &lt;property name="VisibleAP" value="0" vartype="3" /&gt;
          &lt;/ddsxmlobj&gt;
        &lt;/layoutobject&gt;
        &lt;connector lineroutestyle="Microsoft.DataWarehouse.Layout.GraphLayout" sourceid="1" destid="2" sourceattachpoint="7" destattachpoint="6" segmenteditmode="0" bendpointeditmode="0" bendpointvisibility="2" relatedid="0" virtual="0"&gt;
          &lt;point x="2170" y="6085" /&gt;
          &lt;point x="2170" y="7871" /&gt;
          &lt;point x="1799" y="7871" /&gt;
          &lt;point x="1799" y="9657" /&gt;
        &lt;/connector&gt;
      &lt;/ddscontrol&gt;
    &lt;/dds&gt;&lt;/dwd:Layout&gt;&lt;/dwd:DtsDataFlowDiagram&gt;&lt;dwd:DtsComponentDesignerPropertiesList&gt;&lt;dwd:DtsComponentDesignTimeProperty&gt;&lt;dwd:key xsi:type="xsd:string"&gt;192 DataSourceViewID&lt;/dwd:key&gt;&lt;/dwd:DtsComponentDesignTimeProperty&gt;&lt;dwd:DtsComponentDesignTimeProperty&gt;&lt;dwd:key xsi:type="xsd:string"&gt;30 DataSourceViewID&lt;/dwd:key&gt;&lt;/dwd:DtsComponentDesignTimeProperty&gt;&lt;/dwd:DtsComponentDesignerPropertiesList&gt;&lt;/TaskHost&gt;</DTS:Property><DTS:Property DTS:Name="Namespace">dts-designer-1.0</DTS:Property><DTS:Property DTS:Name="ObjectName">{B5979C92-2E58-45F5-A681-101ECC593D0F}</DTS:Property><DTS:Property DTS:Name="DTSID">{7336A91C-CF4B-448A-9851-99D7F7905615}</DTS:Property><DTS:Property DTS:Name="Description"></DTS:Property><DTS:Property DTS:Name="CreationName"></DTS:Property></DTS:PackageVariable>
    <DTS:PackageVariable><DTS:Property DTS:Name="PackageVariableValue" DTS:DataType="8">&lt;PipelinePath xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0"&gt;&lt;dwd:DestinationName&gt;SQL Server Destination Input&lt;/dwd:DestinationName&gt;&lt;dwd:SourceName&gt;Flat File Source Output&lt;/dwd:SourceName&gt;&lt;/PipelinePath&gt;</DTS:Property><DTS:Property DTS:Name="Namespace">dts-designer-1.0</DTS:Property><DTS:Property DTS:Name="ObjectName">{B5979C92-2E58-45F5-A681-101ECC593D0F}-229</DTS:Property><DTS:Property DTS:Name="DTSID">{F0C3788A-7E07-47DA-93E9-8B97F382BF0B}</DTS:Property><DTS:Property DTS:Name="Description"></DTS:Property><DTS:Property DTS:Name="CreationName"></DTS:Property></DTS:PackageVariable>
    <DTS:PackageVariable><DTS:Property DTS:Name="PackageVariableValue" DTS:DataType="8">&lt;Package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0"&gt;&lt;dwd:DtsControlFlowDiagram&gt;&lt;dwd:BoundingLeft&gt;1000&lt;/dwd:BoundingLeft&gt;&lt;dwd:BoundingTop&gt;1000&lt;/dwd:BoundingTop&gt;&lt;dwd:Layout&gt;&lt;dds&gt;
      &lt;diagram fontclsid="{0BE35203-8F91-11CE-9DE3-00AA004BB851}" mouseiconclsid="{0BE35204-8F91-11CE-9DE3-00AA004BB851}" defaultlayout="Microsoft.DataWarehouse.Layout.GraphLayout" defaultlineroute="Microsoft.DataWarehouse.Layout.GraphLayout" version="7" nextobject="5" scale="100" pagebreakanchorx="0" pagebreakanchory="0" pagebreaksizex="0" pagebreaksizey="0" scrollleft="0" scrolltop="0" gridx="150" gridy="150" marginx="1000" marginy="1000" zoom="100" x="19315" y="14314" backcolor="15334399" defaultpersistence="2" PrintPageNumbersMode="3" PrintMarginTop="0" PrintMarginBottom="635" PrintMarginLeft="0" PrintMarginRight="0" marqueeselectionmode="1" mousepointer="0" snaptogrid="0" autotypeannotation="1" showscrollbars="0" viewpagebreaks="0" donotforceconnectorsbehindshapes="1" backpictureclsid="{00000000-0000-0000-0000-000000000000}"&gt;
        &lt;font&gt;
          &lt;ddsxmlobjectstreamwrapper binary="01010000900180380100065461686f6d61" /&gt;
        &lt;/font&gt;
        &lt;mouseicon&gt;
          &lt;ddsxmlobjectstreamwrapper binary="6c74000000000000" /&gt;
        &lt;/mouseicon&gt;
      &lt;/diagram&gt;
      &lt;layoutmanager&gt;
        &lt;ddsxmlobj /&gt;
      &lt;/layoutmanager&gt;
      &lt;ddscontrol controlprogid="DdsShapes.DdsObjectManagedBridge.1" tooltip="Data Flow Task" left="6033" top="5159" logicalid="2" controlid="1" masterid="0" hint1="0" hint2="0" width="3598" height="1164" noresize="0" nomove="0" nodefaultattachpoints="0" autodrag="1" usedefaultiddshape="1" selectable="1" showselectionhandles="1" allownudging="1" isannotation="0" dontautolayout="0" groupcollapsed="0" tabstop="1" visible="1" snaptogrid="0"&gt;
        &lt;control&gt;
          &lt;ddsxmlobjectstreaminitwrapper binary="000800000e0e00008c040000" /&gt;
        &lt;/control&gt;
        &lt;layoutobject&gt;
          &lt;ddsxmlobj&gt;
            &lt;property name="LogicalObject" value="{B5979C92-2E58-45F5-A681-101ECC593D0F}" vartype="8" /&gt;
            &lt;property name="ShowConnectorSource" value="0" vartype="2" /&gt;
          &lt;/ddsxmlobj&gt;
        &lt;/layoutobject&gt;
        &lt;shape groupshapeid="0" groupnode="0" /&gt;
      &lt;/ddscontrol&gt;
    &lt;/dds&gt;&lt;/dwd:Layout&gt;&lt;/dwd:DtsControlFlowDiagram&gt;&lt;/Package&gt;</DTS:Property><DTS:Property DTS:Name="Namespace">dts-designer-1.0</DTS:Property><DTS:Property DTS:Name="ObjectName">{EC825619-4A91-4F4D-86CE-1471D522763F}</DTS:Property><DTS:Property DTS:Name="DTSID">{B34DD757-D5C2-4F46-AAD1-124BB6A0003D}</DTS:Property><DTS:Property DTS:Name="Description"></DTS:Property><DTS:Property DTS:Name="CreationName"></DTS:Property></DTS:PackageVariable><DTS:Property DTS:Name="ForceExecValue">0</DTS:Property><DTS:Property DTS:Name="ExecValue" DTS:DataType="3">0</DTS:Property><DTS:Property DTS:Name="ForceExecutionResult">-1</DTS:Property><DTS:Property DTS:Name="Disabled">0</DTS:Property><DTS:Property DTS:Name="FailPackageOnFailure">0</DTS:Property><DTS:Property DTS:Name="FailParentOnFailure">0</DTS:Property><DTS:Property DTS:Name="MaxErrorCount">1</DTS:Property><DTS:Property DTS:Name="ISOLevel">1048576</DTS:Property><DTS:Property DTS:Name="LocaleID">1049</DTS:Property><DTS:Property DTS:Name="TransactionOption">1</DTS:Property><DTS:Property DTS:Name="DelayValidation">0</DTS:Property>
    <DTS:LoggingOptions><DTS:Property DTS:Name="LoggingMode">0</DTS:Property><DTS:Property DTS:Name="FilterKind">1</DTS:Property><DTS:Property DTS:Name="EventFilter" DTS:DataType="8"></DTS:Property></DTS:LoggingOptions>
    <DTS:Executable DTS:ExecutableType="{C3BF9DC1-4715-4694-936F-D3CFDA9E42C5}"><DTS:Property DTS:Name="ExecutionLocation">0</DTS:Property><DTS:Property DTS:Name="ExecutionAddress"></DTS:Property><DTS:Property DTS:Name="TaskContact"></DTS:Property><DTS:Property DTS:Name="ForceExecValue">0</DTS:Property><DTS:Property DTS:Name="ExecValue" DTS:DataType="3">0</DTS:Property><DTS:Property DTS:Name="ForceExecutionResult">-1</DTS:Property><DTS:Property DTS:Name="Disabled">0</DTS:Property><DTS:Property DTS:Name="FailPackageOnFailure">0</DTS:Property><DTS:Property DTS:Name="FailParentOnFailure">0</DTS:Property><DTS:Property DTS:Name="MaxErrorCount">1</DTS:Property><DTS:Property DTS:Name="ISOLevel">1048576</DTS:Property><DTS:Property DTS:Name="LocaleID">-1</DTS:Property><DTS:Property DTS:Name="TransactionOption">1</DTS:Property><DTS:Property DTS:Name="DelayValidation">0</DTS:Property>
    <DTS:LoggingOptions><DTS:Property DTS:Name="LoggingMode">0</DTS:Property><DTS:Property DTS:Name="FilterKind">1</DTS:Property><DTS:Property DTS:Name="EventFilter" DTS:DataType="8"></DTS:Property></DTS:LoggingOptions><DTS:Property DTS:Name="ObjectName">Data Flow Task</DTS:Property><DTS:Property DTS:Name="DTSID">{B5979C92-2E58-45F5-A681-101ECC593D0F}</DTS:Property><DTS:Property DTS:Name="Description">Data Flow Task</DTS:Property><DTS:Property DTS:Name="CreationName">{C3BF9DC1-4715-4694-936F-D3CFDA9E42C5}</DTS:Property><DTS:Property DTS:Name="DisableEventHandlers">0</DTS:Property><DTS:ObjectData><pipeline id="0" name="pipelineXml" description="pipelineXml" defaultBufferMaxRows="10000" engineThreads="5" defaultBufferSize="10485760" BLOBTempStoragePath="" bufferTempStoragePath="" runInOptimizedMode="true">
    <components>
    <component id="192" name="SQL Server Destination" componentClassID="{5244B484-7C76-4026-9A01-00928EA81550}" description="SQL Server Destination" localeId="-1" usesDispositions="false" validateExternalMetadata="True" version="4" pipelineVersion="0" contactInfo="SQL Server Destination;Microsoft Corporation;Microsoft SqlServer v9; (C) 2005 Microsoft Corporation; All Rights Reserved; http://www.microsoft.com/sql/support;4">
    <properties>
    <property id="193" name="DefaultCodePage" dataType="System.Int32" state="default" isArray="false" description="Specifies the column code page to use when code page information is unavailable from the data source." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">866</property>
    <property id="194" name="AlwaysUseDefaultCodePage" dataType="System.Boolean" state="default" isArray="false" description="Forces the use of the DefaultCodePage property value when describing character data." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">true</property>
    <property id="196" name="BulkInsertTableName" dataType="System.String" state="default" isArray="false" description="The name of the database object to copy data into." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">[test]</property>
    <property id="197" name="BulkInsertCheckConstraints" dataType="System.Boolean" state="default" isArray="false" description="Specifies that any constraints on the destination object are checked during the data copy operation. Corresponds to the bulk insert CHECK_CONSTRAINTS option." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">true</property>
    <property id="198" name="BulkInsertFirstRow" dataType="System.Int32" state="default" isArray="false" description="Specifies the number of the first row to copy. Corresponds to the bulk insert FIRSTROW option." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">-1</property>
    <property id="199" name="BulkInsertFireTriggers" dataType="System.Boolean" state="default" isArray="false" description="Specifies that any insert triggers defined on the destination object will execute during the data copy. Corresponds to the bulk insert FIRE_TRIGGERS option." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">false</property>
    <property id="200" name="BulkInsertKeepIdentity" dataType="System.Boolean" state="default" isArray="false" description="Indicates whether the values supplied for identity columns will be copied to the destination. If false, values for identity columns will be auto-generated at the destination. Corresponds to the bulk insert KEEPIDENTITY option." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">false</property>
    <property id="201" name="BulkInsertKeepNulls" dataType="System.Boolean" state="default" isArray="false" description="Indicates whether then columns containing null will have null copied to the destination. If false, columns containing null will have their default values inserted at the destinaton.  Applies only if fast load is turned on." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">false</property>
    <property id="202" name="BulkInsertLastRow" dataType="System.Int32" state="default" isArray="false" description="Specifies the number of the last row to copy. Corresponds to the bulk insert LASTROW option." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">-1</property>
    <property id="203" name="BulkInsertMaxErrors" dataType="System.Int32" state="default" isArray="false" description="Specifies the maximum number of syntax errors and compilation errors that can occur before the data copy operation is canceled. Each row that cannot be copied is ignored and counted as one error. Corresponds to the bulk insert MAXERRORS option." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">-1</property>
    <property id="204" name="BulkInsertOrder" dataType="System.String" state="default" isArray="false" description="Specifies how the data to be copied is sorted. Corresponds to the bulk insert ORDER option." typeConverter="" UITypeEditor="" containsID="false" expressionType="None"></property>
    <property id="205" name="BulkInsertTablock" dataType="System.Boolean" state="default" isArray="false" description="Specifies that a table-level lock is acquired for the duration of the data copy operation. Corresponds to the bulk insert TABLOCK option." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">true</property>
    <property id="206" name="Timeout" dataType="System.Int32" state="default" isArray="false" description="Specifies in seconds the amount of time the SQL Destination adapter will wait before terminating if there is no data available for insertion.  A timeout value of 0 means the SQL Destination adapter will not time out." typeConverter="" UITypeEditor="" containsID="false" expressionType="Notify">30</property>
    <property id="207" name="MaxInsertCommitSize" dataType="System.Int32" state="default" isArray="false" description="Specifies when commits are issued during data insertion.  A value of 0 specifies that one commit will be issued at the end of data insertion." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">0</property></properties>
    <connections>
    <connection id="195" name="OleDbConnection" description="The OLE DB runtime connection used to access the database." connectionManagerID="{8DE8F720-5485-4A75-95D3-C1E444D30FC9}"/></connections>
    <inputs>
    <input id="208" name="SQL Server Destination Input" description="" hasSideEffects="true" dangling="false" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed"><inputColumns>
    <inputColumn id="250" name="" description="" lineageId="18" usageType="readOnly" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed" externalMetadataColumnId="247"/>
    <inputColumn id="251" name="" description="" lineageId="22" usageType="readOnly" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed" externalMetadataColumnId="248"/>
    <inputColumn id="252" name="" description="" lineageId="26" usageType="readOnly" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed" externalMetadataColumnId="249"/>
    </inputColumns><externalMetadataColumns isUsed="True">
    <externalMetadataColumn id="247" name="Column 0" description="" precision="0" scale="0" length="50" dataType="str" codePage="866"/>
    <externalMetadataColumn id="248" name="Column 1" description="" precision="0" scale="0" length="50" dataType="str" codePage="866"/>
    <externalMetadataColumn id="249" name="Column 2" description="" precision="0" scale="0" length="50" dataType="str" codePage="866"/></externalMetadataColumns></input>
    </inputs>
    </component>
    <component id="1" name="Flat File Source" componentClassID="{90C7770B-DE7C-435E-880E-E718C92C0573}" description="Flat File Source" localeId="1049" usesDispositions="true" validateExternalMetadata="True" version="1" pipelineVersion="0" contactInfo="Flat File Source;Microsoft Corporation;Microsoft SqlServer v9; (C) 2005 Microsoft Corporation; All Rights Reserved; http://www.microsoft.com/sql/support;1">
    <properties>
    <property id="7" name="RetainNulls" dataType="System.Boolean" state="default" isArray="false" description="Specifies whether zero-length columns are treated as null." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">false</property>
    <property id="8" name="FileNameColumnName" dataType="System.String" state="default" isArray="false" description="Specifies the name of an output column containing the file name. If no name is specified, no output column containing the file name will be generated." typeConverter="" UITypeEditor="" containsID="false" expressionType="None"></property></properties>
    <connections>
    <connection id="6" name="FlatFileConnection" description="" connectionManagerID="{EB9C3580-E0FA-49DC-A78C-170FBF1C8E0A}"/></connections>
    <outputs>
    <output id="2" name="Flat File Source Output" description="" exclusionGroup="0" synchronousInputId="0" deleteOutputOnPathDetached="false" hasSideEffects="false" dangling="false" isErrorOut="false" isSorted="false" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed"><outputColumns>
    <outputColumn id="18" name="Column 0" description="" lineageId="18" precision="0" scale="0" length="50" dataType="str" codePage="866" sortKeyPosition="0" comparisonFlags="0" specialFlags="0" errorOrTruncationOperation="Conversion" errorRowDisposition="FailComponent" truncationRowDisposition="FailComponent" externalMetadataColumnId="17"><properties>
    <property id="19" name="FastParse" dataType="System.Boolean" state="default" isArray="false" description="Indicates whether the column uses the faster, locale-neutral parsing routines." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">false</property>
    <property id="20" name="UseBinaryFormat" dataType="System.Boolean" state="default" isArray="false" description="Indicates whether the data is in binary format." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">false</property></properties></outputColumn>
    <outputColumn id="22" name="Column 1" description="" lineageId="22" precision="0" scale="0" length="50" dataType="str" codePage="866" sortKeyPosition="0" comparisonFlags="0" specialFlags="0" errorOrTruncationOperation="Conversion" errorRowDisposition="FailComponent" truncationRowDisposition="FailComponent" externalMetadataColumnId="21"><properties>
    <property id="23" name="FastParse" dataType="System.Boolean" state="default" isArray="false" description="Indicates whether the column uses the faster, locale-neutral parsing routines." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">false</property>
    <property id="24" name="UseBinaryFormat" dataType="System.Boolean" state="default" isArray="false" description="Indicates whether the data is in binary format." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">false</property></properties></outputColumn>
    <outputColumn id="26" name="Column 2" description="" lineageId="26" precision="0" scale="0" length="50" dataType="str" codePage="866" sortKeyPosition="0" comparisonFlags="0" specialFlags="0" errorOrTruncationOperation="Conversion" errorRowDisposition="FailComponent" truncationRowDisposition="FailComponent" externalMetadataColumnId="25"><properties>
    <property id="27" name="FastParse" dataType="System.Boolean" state="default" isArray="false" description="Indicates whether the column uses the faster, locale-neutral parsing routines." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">false</property>
    <property id="28" name="UseBinaryFormat" dataType="System.Boolean" state="default" isArray="false" description="Indicates whether the data is in binary format." typeConverter="" UITypeEditor="" containsID="false" expressionType="None">false</property></properties></outputColumn></outputColumns><externalMetadataColumns isUsed="True">
    <externalMetadataColumn id="17" name="Column 0" description="" precision="0" scale="0" length="50" dataType="str" codePage="866"/>
    <externalMetadataColumn id="21" name="Column 1" description="" precision="0" scale="0" length="50" dataType="str" codePage="866"/>
    <externalMetadataColumn id="25" name="Column 2" description="" precision="0" scale="0" length="50" dataType="str" codePage="866"/></externalMetadataColumns></output>
    <output id="3" name="Flat File Source Error Output" description="" exclusionGroup="0" synchronousInputId="0" deleteOutputOnPathDetached="false" hasSideEffects="false" dangling="false" isErrorOut="true" isSorted="false" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed"><outputColumns>
    <outputColumn id="29" name="Flat File Source Error Output Column" description="Flat File Source Error Output Column" lineageId="29" precision="0" scale="0" length="0" dataType="text" codePage="866" sortKeyPosition="0" comparisonFlags="0" specialFlags="0" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed" externalMetadataColumnId="0"/>
    <outputColumn id="4" name="ErrorCode" description="" lineageId="4" precision="0" scale="0" length="0" dataType="i4" codePage="0" sortKeyPosition="0" comparisonFlags="0" specialFlags="1" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed" externalMetadataColumnId="0"/>
    <outputColumn id="5" name="ErrorColumn" description="" lineageId="5" precision="0" scale="0" length="0" dataType="i4" codePage="0" sortKeyPosition="0" comparisonFlags="0" specialFlags="2" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed" externalMetadataColumnId="0"/></outputColumns><externalMetadataColumns isUsed="False"/></output>
    </outputs>
    </component>
    </components>
    <paths>
    <path id="229" name="Flat File Source Output" description="" startId="2" endId="208"/>
    </paths></pipeline></DTS:ObjectData></DTS:Executable><DTS:Property DTS:Name="ObjectName">Package</DTS:Property><DTS:Property DTS:Name="DTSID">{EC825619-4A91-4F4D-86CE-1471D522763F}</DTS:Property><DTS:Property DTS:Name="Description"></DTS:Property><DTS:Property DTS:Name="CreationName">MSDTS.Package.1</DTS:Property><DTS:Property DTS:Name="DisableEventHandlers">0</DTS:Property></DTS:Executable>

     

    2 февраля 2007 г. 7:45
  • Решил проблему проще, перекодировав программой.

    2 февраля 2007 г. 10:26
  •  ugin написано:

    Решил проблему проще, перекодировав программой.

    Не спортивно :) А вообще мне SSIS не понравился интерфейсом в плане создания, сохранения и выполнения пакетов. Почему в package explorer я вижу папку "Connection Manager", а по правой кнопке не могу создать новый, приходится пользоваться верхним меню.

    Сохранил пакет as xml - так он пропал из SSIS packages, пришлось его обратно импортировать.

    А запустить dtsx-пакет, открытый с диска, вообще нельзя :)

    2 февраля 2007 г. 14:37
  • ? ??????? ??? ????????? ?????? ? ?????????? ??????????? ??? ??? Script Component.

    ????? ASCII ?????? ?? DBF.

    ??? ?????? ????? ?????? 949 ???????? ? ???? ???? 1252.

    ????? ????? Jet 4.0:

    Data Source=C:\Work\CATALOG_TEXT\;Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=dBASE 5.0

    Imports System

    'Imports System.Data

    'Imports System.Xml

    Imports System.Math

    Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

    Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

    Imports System.Threading

    Imports System.Globalization

    Imports System.Text

    Imports System.Collections.Generic

    Imports Microsoft.Win32

    '.......

    Private Const TARGET_CP As Int32 = 949

    Private Shared ReadOnly _encHlp As EncodeHelper = New EncodeHelper(GetActiveCodePage, TARGET_CP)

    yourVal = _encHlp.ConvertAsciiToUnicode(yourVal)

    '.........

     

    Private Class EncodeHelper

    Private _srcEnc As Encoding, _dstEnc As Encoding

    Public Sub New(ByVal rawEnc As Int32, ByVal unicodeEnc As Int32)

    _srcEnc = ASCIIEncoding.GetEncoding(rawEnc, New EncoderExceptionFallback(), New DecoderExceptionFallback())

    _dstEnc = ASCIIEncoding.GetEncoding(unicodeEnc, New EncoderExceptionFallback(), New DecoderExceptionFallback())

    End Sub

    Public Function ConvertAsciiToUnicode(ByVal str As String) As String

    Dim mbcs() As Byte

    mbcs = _srcEnc.GetBytes(str)

    Return _dstEnc.GetString(mbcs)

    End Function

    End Class

    Private Shared Function GetActiveCodePage() As Int32

    Dim kVal As Object = Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Xbase", "DataCodePage", "OEM")

    Dim v As String = DirectCast(kVal, String).ToLower()

    Dim res As Int32

    With Thread.CurrentThread.CurrentCulture.TextInfo

    If v = "ansi" Then res = .ANSICodePage Else res = .OEMCodePage

    End With

    Return res

    End Function

    7 февраля 2007 г. 10:26
  •  Данила Полевщиков написано:

    А запустить dtsx-пакет, открытый с диска, вообще нельзя :)

    Открытый в Visual Studio, вне контекста проекта? Увы, нельзя, так же как нельзя открыть отдельный C# или С++ файл вне проекта, и запустить его на отладку.

    Для этого есть DtExecUI - он и запускается по умолчанию по двойному щелчку на .dtsx файлах.

    9 февраля 2007 г. 23:51