Results 1 to 4 of 4

Thread: How to discrete a string with "," or ";" and placing txts/vals in different controls

  1. #1

    Thread Starter
    Hyperactive Member pourkascheff's Avatar
    Join Date
    Apr 2020
    Location
    LocalHost
    Posts
    384

    Post How to discrete a string with "," or ";" and placing txts/vals in different controls

    Hello everyone! Sorry, this topic may be repetitious but I'm stuck deeply when I need to close a project the most.

    Here's the thing. Consider a long string in a notepad.txt file as shown below:
    "Last Name, First name, Gender, Age, Email, Phone number, blank, [so many other parameters]"

    Previously I used DataGridView and *.csv files which do the same but I need to use those datas in different controls.



    Edit: I heard somewhere Visual Studio libraries will do the matter with simpler method/functions like "remove" and "split" commands. But the problem is I have no idea how to use them...
    Last edited by pourkascheff; Sep 22nd, 2020 at 01:26 AM.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: How to discrete a string with "," or ";" and placing txts/vals in different contr

    Quote Originally Posted by pourkascheff View Post
    I need to use those datas in different controls.
    Congratulations. Now, what's the actual problem that you want help with?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member pourkascheff's Avatar
    Join Date
    Apr 2020
    Location
    LocalHost
    Posts
    384

    Re: How to discrete a string with "," or ";" and placing txts/vals in different contr

    Thanx for replying too-legendary-fast dear jmcilhinney ♥
    *.csv are easy to manipulate by operator, by the way I want to encrypt the text in the future which shows glithes and random data if you open it with Notepad.exe.

    You're saying I still stick to use DataGridView? I mean that's simple but the final purpose for DGV is to use Microsoft Access Database files, doesn't it? I don't know that db file guy nigher.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: How to discrete a string with "," or ";" and placing txts/vals in different contr

    Quote Originally Posted by pourkascheff View Post
    You're saying I still stick to use DataGridView?
    I'm not saying anything. I'm asking what problem you are having that you would like help with, because you haven't told us. You've provided a very vague description of what you're trying to achieve but no explanation of what the actual problem is. If you want to do something then do it. If you are having a problem doing it that would like us to help with, explain what that problem is.
    Quote Originally Posted by pourkascheff View Post
    I mean that's simple but the final purpose for DGV is to use Microsoft Access Database files, doesn't it?
    The DataGridView control has got exactly nothing to do with Access databases. A DataGridView exists to display tabular data and allow the user to input data into that table. Where that data comes from and where it goes to is none of the concern of the grid. The data can be stored directly in the grid but it will more commonly come from a data source. That data source is commonly a DataTable but can be any IList or IListSource object. A DataTable can be populated from a database but also other sources. If it's a database, it can be Access but also any other database. The fact that many examples aimed at beginners use a DataGridview bound to a DataTable populated from an Access database certainly does not mean that that is the only or even most common way ion which it's used.

    As you should be doing with any programming problem, you should be breaking this one down into the smallest parts you can, identifying the parts that you don't already understand and researching them, then asking specific questions about the part(s) you can't figure out for yourself. How you persist data outside your app, how you move data between that external store and your app, how you store data in your app and how you display data in your app are all independent and should be treated as such. You aren't having one problem with all four of those parts so you need to put some thought into it and work out what you can do and what you can't.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width