using dbf in c# .net
-
i tried using wizard it shows data in data adapter when i use odbcConnection1.ConnectionString --> "Dsn=Visual FoxPro Tables;database ='d:\\try\try\\reconcil and bank entry\\TRY\\DOBANK\\tables'" odbcDataAdapter1.Fill(dataSet11, "enet.dbf"); it gives error ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr). ERROR [01S00] [Microsoft][ODBC Visual FoxPro Driver]database ERROR [01S00] [Microsoft][ODBC Visual FoxPro Driver]SourceDB any example of using them can be helpful thanks :):)
It is Good to be Important but! it is more Important to be Good
-
i tried using wizard it shows data in data adapter when i use odbcConnection1.ConnectionString --> "Dsn=Visual FoxPro Tables;database ='d:\\try\try\\reconcil and bank entry\\TRY\\DOBANK\\tables'" odbcDataAdapter1.Fill(dataSet11, "enet.dbf"); it gives error ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr). ERROR [01S00] [Microsoft][ODBC Visual FoxPro Driver]database ERROR [01S00] [Microsoft][ODBC Visual FoxPro Driver]SourceDB any example of using them can be helpful thanks :):)
It is Good to be Important but! it is more Important to be Good
Hi, i made it like this : string conn = "Driver={Microsoft dBASE Driver(*.dbf)};DriverID=277;Dbq=PATH_TO_YOUR_DBF_FILES;"; OdbcConnection Conn = new OdbcConnection(conn); OdbcCommand Comm = new OdbcCommand("select * from xxx limit 30"); Conn.Open(); Comm.Connection = Conn; OdbcDataAdapter DA = new OdbcDataAdapter(Comm); DataSet DS = new DataSet("Table"); DA.Fill(DS); DataGrid.DataSource = DS; DataGrid.DataMember = "Table"; But somethimes it crashes, sometimes it works great ... But i read on the net thats a known bug :sigh:
-
Hi, i made it like this : string conn = "Driver={Microsoft dBASE Driver(*.dbf)};DriverID=277;Dbq=PATH_TO_YOUR_DBF_FILES;"; OdbcConnection Conn = new OdbcConnection(conn); OdbcCommand Comm = new OdbcCommand("select * from xxx limit 30"); Conn.Open(); Comm.Connection = Conn; OdbcDataAdapter DA = new OdbcDataAdapter(Comm); DataSet DS = new DataSet("Table"); DA.Fill(DS); DataGrid.DataSource = DS; DataGrid.DataMember = "Table"; But somethimes it crashes, sometimes it works great ... But i read on the net thats a known bug :sigh:
thanks :)baerten:)
It is Good to be Important but! it is more Important to be Good
-
thanks :)baerten:)
It is Good to be Important but! it is more Important to be Good
I think your dbf might contain a blob or general field. The data adapter can not handle the potential data. (da limit of 8000 or so, when blob could be 4 gig). If you want to send me your dbf, I will send you a code snippet that can read it. With all respect to the prior post, if your reading a FoxPro table AND it has one or more indexes you should not use a dbase driver. Also the dbase driver will truncate the blob masking the problem. pmcgahan@hteinc.com mcgahanfl@hteinc.com
-
thanks :)baerten:)
It is Good to be Important but! it is more Important to be Good
I think your dbf might contain a blob or general field. The data adapter can not handle the potential data. (da limit of 8000 or so, when blob could be 4 gig). If you want to send me your dbf, I will send you a code snippet that can read it. With all respect to the prior post, if your reading a FoxPro table AND it has one or more indexes you should not use a dbase driver. Also the dbase driver will truncate the blob masking the problem. pmcgahan@hteinc.com mcgahanfl@hteinc.com