试图在网上到处搜索,但没有找到答案。
我使用下面的连接和代码创建了表:
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列始终具有小数位。 我该如何解决这类问题?