c# - Microsoft.Jet.OLEDB.4.0 not retrieving delete marked records from DBF -


i using following code retrieve data dbf file...

dbfconnectionstring = "provider=microsoft.jet.oledb.4.0;extended properties=\"dbase iv\";data source=" + apppath + "test\\sales\\" + datetime.now.tostring("yyyymm") + "\\"; oledbconnection odconnection = new oledbconnection(dbfconnectionstring); odconnection.open(); oledbcommand ocmdtest = new oledbcommand("select  * payment", odconnection); ocmdtest.executenonquery(); oledbdataadapter = new oledbdataadapter(ocmdtest); oledbdataadapter.fill(dataset); datatable = dataset.tables[0]; 

this works fine except not retrieving records marked deleted. able retrieve deleted records vfpoledb.1 provider , executing additional code (foxpro excellent gives me issues regarding field formats :-error reading numeric values vfpoledb driver , can fixed casting these fields problem tables big have figure out , cast many fields )

oledbcommand ocmdtest1 = new oledbcommand("set deleted off", odconnection); ocmdtest1.executenonquery(); 

but additional code wont work microsoft.jet.oledb.4.0. how can retrieve deleted records microsoft.jet.oledb.4.0 provider dbf file ? appreciated..

well, couldn't find way read deleted records microsoft.jet.oledb.4.0 or microsoft.ace.oledb.12.0 dbf files. things worked charm when used different provider, advantage ole db provider. installed , referenced 32 bit .dll (since solution targets on any cpu). connection string modified in to..

dbfconnectionstring = @"provider=advantage.oledb.1;user id=adssys;data source=" + apppath + "test\\sales\\" + datetime.now.tostring("yyyymm") + "\\;tabletype=ads_cdx;showdeleted=true;advantage server type=ads_local_server;"; 

here showdeleted=true used include deleted records.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -