Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6682353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:41:46+00:00 2026-05-26T04:41:46+00:00

After my previous question of SavingToFile with TStringList , I now need to load

  • 0

After my previous question of SavingToFile with TStringList, I now need to load the file I created called Password.txt using LoadFromFile but I don´t know what the form of LoadFromFile is. The Password.txt is in the same folder as the program that needs to load it but I keep getting Access Violation at different addresses when I try LoadToFile in the way I thought it would work. How to I load Password.txt to a string in Delphi without getting a violation ?

Please help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:41:46+00:00Added an answer on May 26, 2026 at 4:41 am
    var
      StringList: TStringList;
    ...
      StringList := TStringList.Create;
      try
        StringList.LoadFromFile('myfile.txt');
        //do stuff with StringList
      finally
        StringList.Free;
      end;
    

    You are probably forgetting to create the string list properly with code like this:

    StringList.Create;//don't do this
    

    or

    StringList.LoadFromFile('myfile.txt');//must create StringList first
    

    But without seeing your code all we can do is guess as to what your problem is. That said, the first sample of code above is correct.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After the previous question What are the important rules in Object Model Design, now
The VXML application I mentioned in a previous question is now in testing. After
After my previous question I heve this one, that might be better. I need
After considering the answers to my previous question ( One SVN Repository or many?
After getting fine answer to my previous question , I came across another problem.
After implementing some of the solutions in my previous question , I've come up
After reflecting upon all the great answers I received to my previous question about
Hello every one this is extension to my previous question.Here is the link File
After what I learned from my previous question , I would like to use
After exploring the very excellent answer from Heike to my previous question about anamorphic

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.