Troubleshooting - Getting Error "Index was outside the bounds of the array." When using Import/Export tool in SQL Server
Problem Description:
I just recently installed QODBC to try to get data out of a QuickBooks company file but I get this error: "Index was outside the bounds of the array."
Solution:
Please follow below steps to resolve this error:
1. Go to Import Export Wizard by Right click on your SQL Server database, Click on Task & Click on Import Data.
2. Choose ODBC Data Source & Enter DSN & Connection String and click on "Next".
3. Choose Destination and click on "Next".
4. Choose the second option (Write a query to specify the data to transfer) and click on "Next".
5. Write the query and click on "Next". You cam change table name & query as per your requirement.
For Example:
Select * from Account
6. Change destination table name as per your requirement and click on "Edit Mapping".
7. You need to verify date type of all columns from "Type" column.
You need to make sure that you are not getting 23 in Type. You will get 23 date type data type columns.
You need to replace 23 to date for all columns whose Type is 23 and click on "OK".
8. Click on next till finish.
Save and Run Package.
Complete the Wizard.
9. You can see table data imported to SQL Server local database table.
Keywords: How to use DTS to Import QuickBooks Data into MS SQL Server