I have a DBF file and an index file. I want to read the index file, and the search entries satisfy some condition. (for example: search entries that its StudentName name begins with "A" using Student.DBF and StudentName.idx)
How to do this programmatically?
The easiest way would be to request through OleDB Connection
using System.Data.OleDb; using System.Data; OleDbConnection oConn = new OleDbConnection("Provider=VFPOLEDB.1;Data Source=C:\\PathToYourDataDirectory"); OleDbCommand oCmd = new OleDbCommand(); oCmd.Connection = oConn; oCmd.Connection.Open(); oCmd.CommandText = "select * from SomeTable where LEFT(StudentName,1) = 'A'"; // Create an OleDBAdapter to pull data down // based on the pre-built SQL command and parameters OleDbDataAdapter oDA = new OleDbDataAdapter(oCmd); DataTable YourResults oDA.Fill(YourResults); oConn.Close(); // then you can scan through the records to get whatever String EachField = ""; foreach( DataRow oRec in YourResults.Rows ) { EachField = oRec["StudentName"]; // but now, you have ALL fields in the table record available for you }
, ODBC, ESRI, 3 ( ).DBF(, ), PRJ .SHP. , . Sharpmap codeplex. - dbf ODBC, , . big-endian vs little-endian .
, dbf. , public void ReadAttributes( Stream stream ).
public void ReadAttributes( Stream stream )
Source: https://habr.com/ru/post/1733110/More articles:Cocoa data hierarchy and browser - cocoaЧто именно подразумевается, когда mr.developer говорит: "Пакет" django-quoteme "грязный". - pythonjQuery move div when flipping? - jqueryReading DBF with VFPOLEDB Driver - datasetConfiguring a color scheme for a Silverlight application from an external resource - color-schemeResources for SFML - c ++Метод класса Wrapping через alias_method_chain в плагине для Redmine - ruby-on-railsReliable character retrieval for .doc files - ms-wordСтатья не соответствует макету сайта (Joomla) - articlehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1733115/change-desktop-background-using-vbnet&usg=ALkJrhjO6SavN9oNsCFN0oO6NHYHHNnGBwAll Articles