Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

Create Numeric column in dBase IV table issue with OLEDB

$
0
0

Dear all,

I have caught the issue to create dBase(.dbf) with Numeric column

All the other data type was fine: char, date... except Numeric alway return the value with decimal MAMD(20,5). Is there any solution to make the Numeric data field as MAMD(1,0)? or create the numeric column without decimal. I have tried many data type Int, Integer, Numeric(1), Numeric(1,0)... but nothing is difference

My code as below:

// Using OLEDB to export DBF file                 

string dBaseConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source="+ Dir +";Extended Properties=dBASE IV;";

OleDbConnection connection = newOleDbConnection(dBaseConnection);                

OleDbCommand command = connection.CreateCommand();

string CreateCommand = string.Format(@"CREATE TABLE {0}(HTEN Character(100),GTINH Character(1),NGTHNSINH Date NULL,XD_NTNSINH Character 1),MAQT Character(3),MAMD Integer", tableName);

Please help, thanks!

Vinh


Viewing all articles
Browse latest Browse all 1350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>