It's not that I am not sure how to use SQL, the problem is that I can not
create an SQL database, everythime that I attempt to I get an error message
about somthing called "sp_instance" or something like that.
Hi,
I would like to create a program to keep track of all of DVD in my
collection, but I do no know how I can do such a thing. I use to use
Access
to do this but Access 2007 refuse to use most of the forms that I need to
get to the information.
SO I thought that using VB Express 2008 I could do something that would do
what I need, but I have no clue where to start
--
Thank You in Advance
Merci a l'avance
Martin
Martin,
If you're not sure how to use SQL for storing your DVD collections,
then i'd suggest a basic and really working way.
Store collection in a listbox or listview control, then save the
content in a text file.
A basic sample would work for you:
Dim ItemArray(Me.ListBox1.Items.Count - 1) As Object
Me.ListBox1.Items.CopyTo(ItemArray, 0)
Dim Data As String = Join(ItemArray, Environment.NewLine)
My.Computer.FileSystem.WriteAllText("c:\collection.txt", Data, False)
The parameters of WriteAllText method are up to you (append, data,
path...)
But remember that, your text file will get bigger and unresponsive due
to large amount of text lines over the time, then you may want to
create a new text file.
To get the content of textfile into your listbox:
Dim reader As String
reader = My.Computer.FileSystem.ReadAllText_
("c:\bookmarks.txt")
Dim strs() As String
strs = Split(reader, Environment.NewLine)
For Each s As String In strs
ListBox1.Items.Add(s)
Next
As i stated, you can use this way if your must-do is urgent and
collection is not huge.
Hope this works