整数列在DBASE IV dbf中有小数位

时间:2017-12-22 11:40:01

标签: c# oledb jet dbase

试图在网上到处搜索,但没有找到答案。

我使用下面的连接和代码创建了表:

    string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ FilePath +";Extended Properties=dBase IV";

    command.CommandText = "CREATE TABLE " + FileName + " ([JNL] VarChar(4), " +
                                                                     "[LINE] VarChar(5), " +
                                                                     "[TYPE] VarChar(6), " +
                                                                     "[DRACC] VarChar(9), " +
                                                                     "[CRACC] VarChar(9), " +
                                                                     "[EXPDRACC] NvarChar(12), " +
                                                                     "[EXPCRACC] NvarChar(12), " +
                                                                     "[DRSTITLE] VarChar(9), " +
                                                                     "[CRSTITLE] VarChar(9), " +
                                                                     "[DOCDATE] DateTime, " +
                                                                     "[REF] VarChar(8), " +
                                                                     "[DRAMT] Integer, " +
                                                                     "[CRAMT] Integer, " +
                                                                     "[LARGE] VarChar(7), " +
                                                                     "[DESC] VarChar(6), " +
                                                                     "[TRACE] VarChar(6), " +
                                                                     "[TRNDR] VarChar(7), " +
                                                                     "[TRNCR] VarChar(7), " +
                                                                     "[PARTS1] VarChar(8), " +
                                                                     "[PARTS2] VarChar(8), " +
                                                                     "[PARTS3] VarChar(8), " +
                                                                     "[PARTS4] VarChar(8), " +
                                                                     "[PARTS5] VarChar(8))";

编辑:在excel中查看时,DRAMT和CRAMT列始终具有小数位。 我该如何解决这类问题?

0 个答案:

没有答案