Arrays in C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sajitk
    New Member
    • Feb 2008
    • 77

    Arrays in C#

    Dear All,

    I have the following table

    Lines Heads Proposal No

    02 Travel Prop-001
    03 Cost Prop-001

    The records for the particular Proposal no is not limited. It can vary with 2 or more records.Now on the click of a buttn, i want IIA to be added to the values saved under the lines for all records for that particular Proposal No. This is the new table look

    Lines Heads Proposal No

    02IIA Travel Prop-001
    03IIA Cost Prop-001

    Can I do this....wud be grateul if help is provided.

    Thanks / Sajit
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    If your file has:

    Code:
    02 Travel Prop-001
    and you chnage it to:

    Code:
    02IIA Travel Prop-001
    the result is larger than the original.

    That means:

    a) you read the entire file a record at a time, add the IIA in the program am write the record to a new file. When you have processed all the inout records, you can copy the new file back on top of the old file and then delete the new file.

    b) you can construct the inout file so that there is room for the IIA in the form of three spaces. Then as you read records from the file you can use seek() and
    tell() to determine where in the file you drop the IIA. This is an update in place.

    Comment

    • sajitk
      New Member
      • Feb 2008
      • 77

      #3
      Dear Weaknessforcats ,

      can u help me out on this....or can u help me with some links for better understanding.. ...wud be grateful if u could help me....

      sajit

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        I can't write the code for you or act as a tutor. About all I can do is help you get unstuck in code you have already written that does not work.

        Just about any book on C ir C++ will have examples on updating files on disc.

        Of course, I assume you alreayd know C or C++. If not, this will be hard ofr you and you might want to locate a programmer.

        Comment

        Working...