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

  • Question

  • hi,


    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:42 PM

All replies

  • Does is make any difference if you use DECIMAL instead of NUMERIC when using Jet OLEDB? BTW, by default the scale is zero so I don't believe it needs to be specified.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Wednesday, June 10, 2009 2:55 PM
  • Yes we have specific requirement with Numeric(10,0). and by default it creates Numeric(20,5) or Numeric(19,5)
    Thursday, June 11, 2009 6:31 AM
  • OK, so you tried DECIMAL and you get the same result?


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Thursday, June 11, 2009 11:46 AM