SSIS throwing error as: Did not read byte array properly
-
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."
-
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."
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
-
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
-
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."
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.