c# - Search in DBF file using .idx file -
I have a DBF file and an index file. I want to read the index file and the search record completes some condition ( For example: the search record that starts with its student name "Student". Using DBF and StudentName.idx)
How do I program this?
It would be easy to ask through the OLEDB connection
System Using Data.OleDb; Using System.Data; OleDbConnection oConn = New OleDbConnection ("Provider = VFPOLEDB.1; Data Source = C: \\ PathToYourDataDirectory"); Ondebee Command OCMD = New Ondebee Command (); OCmd.Connection = oConn; OCmd.Connection.Open (); OCmd.CommandText = "Choose * from someTable * where LEFT (student name, 1) = 'A'"; // Create data based on pre-built SQL commands and parameters; // Create OleadApapter; OLDBData adapter ODA = new OLDBEditAditor (OSMD); Datalite Your Results Oda Fill (your result); OConn.Close (); // If you can string through the records to get the string each field; Foreign currency (DataRow oRec in YourResults.Rows) {EveryField = oRec ["Student name"]; // But now, you have all the fields available in table records i}
Comments
Post a Comment