Jump to content

Storing multible Text Files in a database. [VB 2008 .NET]

- - - - -

  • Please log in to reply
7 replies to this topic

#1
Worf

Worf

    Newbie

  • Members
  • Pip
  • 4 posts
Hi.

This is my first time on here and i hope you good people will be able to help me?

I want to create a a program that will store text files in different Catagories and Sub-Catagories that the user either types or imports into the program.

There will be different options to the user as to where to store the text files.

Example:

There are two main buttons: (Catagories)

[FPI]
[FPE]

And buttons\Combo Boxs for the Sub-Catagories.

Sub-Catagories:

[Attack]
[Run]
[Water]

ect.

Now, if the user selects [FPI] and then selects [Attack], i want to be able to store a text file under these catagories. Either typed in or imported.

Or,

The user selects [FPE] and then selects [Run], store the text file under these catagories. Either typed in or imported.

and so on.


So, you will end up with.

Catagory [FPI] - Sub-Catagoy [Attack] - text file name. (The name of the Text File stored.)

The program would need to be able to display in a text box a list of text files stored in that catagory, by their filename. (Text File Names)
The user needs to be able to click on a text filename displayed in the text box and have that text file displayed on another form in another text box.
Also be able to save the selected text file to a folder as a text file or printed.

Many Thanks for your help.

Regards

Worf.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Sounds like you need a table with three fields in it. You can use SELECT DISTINCT to get the Categories and Sub-Categories.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Worf

Worf

    Newbie

  • Members
  • Pip
  • 4 posts
Hi WingedPanter.

Thank you for your reply. I was also looking for some code that i can work on, loading the text files into the database in the correct catagories, ect.
Can it be done using 'ArrayList()', or is there a better way?

Regards

Worf

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Unfortunately, I don't know VB, just databases :)
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
Worf

Worf

    Newbie

  • Members
  • Pip
  • 4 posts
No problem Winged. Thank you anyway.

#6
Blimp

Blimp

    Programmer

  • Members
  • PipPipPipPip
  • 154 posts
The thing is... Your problem is with what you're saying: You want to store the FILE inside a database. Note that databases dont actually store files, but rather data (which could reference to files or even have file data inside).

What you'll need to do is load the data from the file, put it into a temp variable, then insert into the database.

Youtube is great help with databases in VB, though I've never been able to get the hang of it (Since I mainly use MySQL with webdevelopment)

Blimp.

#7
Worf

Worf

    Newbie

  • Members
  • Pip
  • 4 posts
Hi Blimp.

Thank you for your reply. I think that is where i have been going wrong when posting for help. I have been saying store files in a database and not data. Will have a look on youtube.

Worf

#8
Blimp

Blimp

    Programmer

  • Members
  • PipPipPipPip
  • 154 posts
Awesome. If you run into any problems, feel free to send me a PM!

~ Blimp.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users