I have created a table in an MS Access database. The table has 14 fields which are named "1", "2", etc. Some of the fields have the data type set to double with 5 decimal points.
When I use FASTINSERT to write data into the table, I obtain only integers and rounded-off numbers without any fractions, even in the fields that are of a double data type.
colnames = {'1','2','3','4','5','6','7','8','9','10','11','12','13','14'}fastinsert(conn, 'new_Table', colnames, myData)
Depending on the database type and the column name format, different behavior may be observed
Using FASTINSERT with a column name which has spaces in it with a MS SQL database, may result in this error:
??? Error using ==> database.fastinsert at 102 [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'column'.
Using FASTINSERT with a numeric column name in a MS SQL Database may result in this error:
??? Java exception occurred: java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'Table1'. at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.SQLExecute(Unknown Source) at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(Unknown Source) Error in ==> database.fastinsert at 184 StatementObject.execute;
Best Answer