TheSwamp
Code Red => .NET => Topic started by: Troy Williams on August 09, 2005, 01:56:53 PM
-
I was in the middle of playing with MySQL and normalizing tables when I said to myself, there has to be a better way. In the course of googling, I stumbled on this http://www.db4o.com/about/productinformation/. I tried it and and I think it is really neat. I just started to play around with this. So far, for the type of database work that I need, this fits the bill nicely.
-
Thanks Troy , bookmarked ...
I've been playing with the MS SQL2005 Beta.
Seems pretty Good .. but it's my first foray into databases other than Access < does that count > , so ignorance may be bliss.
-
I've been playing with the MS SQL2005 Beta.
That's what started me into this adventure. I tried to install SQL 2005 Beta, but it would not allow me to install - it said I had an out of date .Net framework. Apperently the framework that ships with VB 2005 Beta is not good enough. The solution that I found to install SQL 2005 was to uninstall all of my .Net stuff (vb 2005, vb 2003, etc...) then install SQL 2005 first and everything after that.
Well that seemed like a lot of work. To make a long story short I download MySQL instead (it really is very nice and there is a site http://www.vbmysql.com/ that has a number if really good tutorials on using VB.net and MySQL, it even tells you how to install MySQL).
Kerry, you should give db4o a try. It'll be easier for you since you as there documentation is in C#.
-
Here is a small little teaser:
Try
myDB = Db4o.openFile(Application.StartupPath & "\" & DB_NAME) 'open the database - if it doesn't exist create it.
myDB.set(_cars) 'Store the object
Catch ex As Exception
MessageBox.Show(ex.ToString)
Finally
myDB.close() 'clost the database
End Try
There is a little bit more, but not much. You don't need to define anything in the database at all! You just pass it the object that you want to store. That's it.
Here is a query:
Dim carColCounter As List(Of Car)
Dim protoCarCol As New List(Of Car) 'this is the type of object that we want to find
Dim result As ObjectSet = myDB.get(protoCarCol) 'store the results of the query in result
writeLine(result.size() & " Car Collections found...") 'routine to output the number of car collection objects found.
While result.hasNext
carColCounter = DirectCast(result.next, List(Of Car)) 'cast each of the results into a car collection
For Each carCounter In carColCounter 'print out the proper information
writeLine(carCounter.ToString)
Next
End While
I haven't been this excited since I downloaded and tried VB 2005 for the first time.
-
That looks like an interesting library Troy.
Though you are correct about my preference, I dont like the idea of typing Dim a coupla hundred times a day.
Heh, I just noticed where you work. That would be a blast !!