4 Replies - 4244 Views - Last Post: 21 February 2009 - 04:42 AM Rate Topic: -----

#1 red_4900  Icon User is offline

  • Code T(h)inkers
  • member icon

Reputation: 21
  • View blog
  • Posts: 1,119
  • Joined: 22-February 08

Search function

Posted 19 February 2009 - 08:21 AM

I'm trying to create inventory program for personal collection. I'm still in designing process, so I don't have any code to show right now.

So the idea is like this :
- user choose type of item
- store item's data in somewhere
- manage item's data. sort data
- search item
- display item's inventory

Any idea on how to search the item? I did looked at MSDN website if there's any search function within the .Net framework, but failed. Or did I miss? I think I can create my own search function if it's just using brute force, but I'm looking if there's any better idea. I don't need code, I just need someone to guide me and I'll do the rest. Any help is greatly appreciated. :)

edit : I know in C++ you can store data in .dat/.txt file. Is it possible in C#? Or is there any other way of doing it?

This post has been edited by red_4900: 19 February 2009 - 08:25 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Search function

#2 bodom658  Icon User is offline

  • Villiage Idiom
  • member icon

Reputation: 113
  • View blog
  • Posts: 1,123
  • Joined: 22-February 08

Re: Search function

Posted 19 February 2009 - 05:52 PM

regular expressions may be of use, or have the user input a string, then go through the file comparing every name of an item to that string until u get a match
Was This Post Helpful? 0
  • +
  • -

#3 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Search function

Posted 19 February 2009 - 07:15 PM

You can store data in many different ways in .NET. You could store it as a text file, in a database, or in an XML file, just to name a few.

Naturally, depending on how you decide to store the data will determine the methods available for searching the data.

Have you decided how you want to store the data?
Was This Post Helpful? 0
  • +
  • -

#4 Todilo  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 85
  • Joined: 13-November 07

Re: Search function

Posted 20 February 2009 - 06:32 AM

I did an inventory application in java a while back and if you know some SQL I can really recommend the same for C#. Searching and listing items with a database is very often a simple task.
Was This Post Helpful? 0
  • +
  • -

#5 red_4900  Icon User is offline

  • Code T(h)inkers
  • member icon

Reputation: 21
  • View blog
  • Posts: 1,119
  • Joined: 22-February 08

Re: Search function

Posted 21 February 2009 - 04:42 AM

View PostJayman, on 19 Feb, 2009 - 06:15 PM, said:

Have you decided how you want to store the data?

I know nothing of XML. They only way I've ever used to store data is in text file. I'm still searching for info on XML right now. Only after I know a bit more about XML will I decide how I store data. Or anyone willing to give me link/article on what is the best way of storing data?

But it will take me some time. Internet at my place recently sucks. :( I'll bump this topic when I have problem again. Thanks everyone. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1