none
Facing Problem in Creating Numeric(10,0) data field with OLEDB and dBASE Drivers RRS feed

  • Question

  • hi,

    Following is my code when i am trying to create a .dbf file with Numeric(10,0) it is successfully created but by default it takes Numeric(19,5) or Numeric(20,5). I am searching for last two days and used dBASE III,IV,V

    Here i am talking specifically for .dbf Creation.

    string
    connString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + System.Web.HttpContext .Current.Server.MapPath(folderPath) + "; Extended Properties=DBASE IV; " ;

                string createStatement = "Create Table " + tableName + " ( " ;

                OleDbCommand cmd = new OleDbCommand ();

                OleDbConnection conn = new OleDbConnection (connString);           

                createStatement += "USR_TXN_NO" ;

                createStatement += " Numeric(10,0), " ;//USR_TXN_NO

                createStatement += "UNITS" ;

                createStatement += " numeric(19,8), " ;//UNITS

                createStatement += "DOB" ;

                createStatement += " Date, " ;//DOB

                createStatement += "ECS_NO" ;

                createStatement += "  numeric(9,0)) " ;//ECS_NO

                DataSet dsCreateTable = new DataSet ();

                //Create the DBF table

                DataSet dsFill = new DataSet ();

     OleDbDataAdapter daInsertTable = new OleDbDataAdapter (createStatement, conn);

                daInsertTable.Fill(dsFill);

     

    Here mentioned all connection string i have already used

     

    string connString = "Provider=vfpoledb.1; Data Source=" + System.Web.HttpContext .Current.Server.MapPath(folderPath) + "; Collating Sequence=general;" ;

     

    string connString = "Provider=vfpoledb.1; Data Source=" + System.Web.HttpContext .Current.Server.MapPath(folderPath) + "; Collating Sequence=general;" ;

     

    string connString = "Provider=vfpoledb.1; Data Source=" + System.Web.HttpContext .Current.Server.MapPath(folderPath) + "; Collating Sequence=general;" ;

     

    string connString = "Provider=vfpoledb; Data Source=" + System.Web.HttpContext .Current.Server.MapPath(folderPath) + "; Collating Sequence=general;" ;

     

    string connString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + System.Web.HttpContext .Current.Server.MapPath(folderPath) + "; Extended Properties=DBASE III;" ;

     

    string connString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + System.Web.HttpContext .Current.Server.MapPath(folderPath) + "; Extended Properties=DBASE IV;" ;

     

    string connString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + System.Web.HttpContext .Current.Server.MapPath(folderPath) + "; Extended Properties=DBASE 5.0;" ;

     

    yes and i also check Version of Microsoft.Jet.OLEDB.4.0 its latest.

    Can any body please help me regarding that.


    Wednesday, June 10, 2009 2:44 PM

All replies