Insert Datatable Database

Hi All, I’m trying to insert datatable into database using INSERT database activity. No error occur but the data inserted are in the wrong format after inserted.

I have check the datatable by output the datatable after read range and the data is correct. So the problem is in ‘INSERT’ database activity.

Example:

Excel that I read and store as datatable:
ID
001
002
003
004

After insert into database:
1
2
3
4

Do you have any other ways to insert a datatable into a database other than using "INSERT’ database activity.

This could be a lot of things, but here is how I would reason about this problem.

First, I would just make sure they have the same data type. If they do, I would suspect this might be a matter of formatting.

In the case of a formatting problem, It might not matter how they are formatted in their respective table columns/fields, since It might be easier to simply set the properties of formatting at the time you extract the table from the DB. What I’m trying to say is, that perhaps the only time you really care about formatting is when you present/display the data, not when you work with it. After all, semantic of the number 001 is the same as the number 1.

Depending on your DB, you might be able to set the properties of that field to be formatted in the way that you want it to be.

Anyway, food for thought. Good luck to you.