c# - Read from a txt file and write to a disconnected recordset -


i have reached point of confusion when researching topic...

i have read fixed-length text file , write disconnected recordset in c#. i'm following example:

public static recordset createdisconnectedrecordset() {     var rs = new recordset(); // create new recordset      // add updatable fields     rs.fields.append(         "name",          datatypeenum.advarchar,          20,          fieldattributeenum.adfldupdatable,          missing.value);      rs.fields.append(         "country",          datatypeenum.advarchar,          20,          fieldattributeenum.adfldupdatable,          missing.value);      rs.open(         missing.value,          missing.value,          cursortypeenum.adopenunspecified,          locktypeenum.adlockunspecified,          0);      // add data     rs.addnew(missing.value, missing.value);     rs.fields["name"].value = "anders";     rs.fields["country"].value = "sweden";     rs.update(missing.value, missing.value);      return rs; } 

while using adodb 2.7 , system.reflection.

i load file using open file dialog , have pass through here. fields parts have values replaced string contains each line streamreader has read file when open it.

i tried splitting creation , opening/writing process 2 classes (opening recordset derived.) outright unfriendly do...

i figured there no need connection because it's reading text file, not csv or database file. every other example see seems require connection somewhere, why don't know...

is there way write recordset txt file? or have few other things write it?

and if asks: file came legacy system moved text format. can't use more modern approach.


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -