Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SSIS throwing error as: Did not read byte array properly

SSIS throwing error as: Did not read byte array properly

Scheduled Pinned Locked Moved Database
helpquestiondatabasesql-serveragentic-ai
4 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    indian143
    wrote on last edited by
    #1

    Hi, I am running an SSIS Package which takes FileName as Variable and runs the Package, strangely when I run the Package from Sql Agent Job Package I am getting this error: Did not read byte array properly But when I run the Package, if the file is open, its reading the file and running the Package properly, if I close the File it gives me error, the Package is using the Jet 4.0 drivers and File has multiple sheets in it, I am giving the name of the second sheet to read, 1. is it because of the multiple sheets or 2. is it because of the Jet drivers, 3. The file path is too long (I saw its 150 characters as it shows, the variable datatype that holds the File name is String) 4. or if the File full Path combined with connection string value, does it become too long to be hold by the Connection string of the Source Connection? I am not sure what is the reason for its throwing this error. Any suggestions welcome please need some help. Thanks in advance. Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

    CHill60C J 2 Replies Last reply
    0
    • I indian143

      Hi, I am running an SSIS Package which takes FileName as Variable and runs the Package, strangely when I run the Package from Sql Agent Job Package I am getting this error: Did not read byte array properly But when I run the Package, if the file is open, its reading the file and running the Package properly, if I close the File it gives me error, the Package is using the Jet 4.0 drivers and File has multiple sheets in it, I am giving the name of the second sheet to read, 1. is it because of the multiple sheets or 2. is it because of the Jet drivers, 3. The file path is too long (I saw its 150 characters as it shows, the variable datatype that holds the File name is String) 4. or if the File full Path combined with connection string value, does it become too long to be hold by the Connection string of the Source Connection? I am not sure what is the reason for its throwing this error. Any suggestions welcome please need some help. Thanks in advance. Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

      CHill60C Offline
      CHill60C Offline
      CHill60
      wrote on last edited by
      #2

      Abdul asked:

      1.is it because of the multiple sheets

      Try replacing "the file" (I'm guessing this is a workbook) with one with only a single sheet and see if the problem still happens

      Abdul asked:

      3.The file path is too long (I saw its 150 characters as it shows, the variable datatype that holds the File name is String) 4.or if the File full Path combined with connection string value, does it become too long to be hold by the Connection string of the Source Connection?

      Try shortening the path - e.g. put it into a temp folder straight off the root, or map a drive to the location. Given that it "works" when you have the file open though, it is unlikely to be any of those. The suggestions are just to indicate that you could have easily discounted them for yourself by experimentation. You are using very old Jet Drivers and you have not mentioned which version of Office or SQL. Try installing at least ACE 12.0 and see if that fixes it. Beyond that, without knowing what the package is trying to do we're fumbling about in the dark

      I 1 Reply Last reply
      0
      • CHill60C CHill60

        Abdul asked:

        1.is it because of the multiple sheets

        Try replacing "the file" (I'm guessing this is a workbook) with one with only a single sheet and see if the problem still happens

        Abdul asked:

        3.The file path is too long (I saw its 150 characters as it shows, the variable datatype that holds the File name is String) 4.or if the File full Path combined with connection string value, does it become too long to be hold by the Connection string of the Source Connection?

        Try shortening the path - e.g. put it into a temp folder straight off the root, or map a drive to the location. Given that it "works" when you have the file open though, it is unlikely to be any of those. The suggestions are just to indicate that you could have easily discounted them for yourself by experimentation. You are using very old Jet Drivers and you have not mentioned which version of Office or SQL. Try installing at least ACE 12.0 and see if that fixes it. Beyond that, without knowing what the package is trying to do we're fumbling about in the dark

        I Offline
        I Offline
        indian143
        wrote on last edited by
        #3

        Yeah we are using only Jet Drivers, but its limitation on Server for now. The office file is .xls file which is 97 version I think. Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

        1 Reply Last reply
        0
        • I indian143

          Hi, I am running an SSIS Package which takes FileName as Variable and runs the Package, strangely when I run the Package from Sql Agent Job Package I am getting this error: Did not read byte array properly But when I run the Package, if the file is open, its reading the file and running the Package properly, if I close the File it gives me error, the Package is using the Jet 4.0 drivers and File has multiple sheets in it, I am giving the name of the second sheet to read, 1. is it because of the multiple sheets or 2. is it because of the Jet drivers, 3. The file path is too long (I saw its 150 characters as it shows, the variable datatype that holds the File name is String) 4. or if the File full Path combined with connection string value, does it become too long to be hold by the Connection string of the Source Connection? I am not sure what is the reason for its throwing this error. Any suggestions welcome please need some help. Thanks in advance. Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

          J Offline
          J Offline
          jschell
          wrote on last edited by
          #4

          indian143 wrote:

          if the file is open, its reading the file and running the Package properly

          You might want to examine that assumption. The fact that it doesn't produce an error that you see, is not sufficient to prove that it worked. It must process the file and produce output that it could have only gotten from the file.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups