Click to See Complete Forum and Search --> : VB Progamming...
humanity
09-01-2004, 11:52 AM
Do we have anybody here very experienced in VB programming? I had a great idea for a program I want to develop solely for personal use, and, as it needs a GUI, I came to the conclusion that VB would be the easiest language to use. I've dabbled in some C++ programming, so I know a little bit about how things work. However, being new to VB, I don't quite know ALL of the resources I have access to -- so I'm not completely sure of the best way to methodically approach my program.
As of now, I've just been "playing" -- programming in VB with very basic methods trying to get done what I hope to. I'm seeking now to find the most efficient method to accomplish my goals so I can focus on learning the tasks needed to achieve it.
My program basically needs to do this:
Have a database with my own custom fields that fall under a single heading -- i.e. a user's computer with sub-information of their specific hardware components by category, or a person's name with sub-information of their age/height
Have the ability for the user to append entries to the database in the fields I have customized
Have the ability to view all database entries in the form of a table
Have the ability to pick and choose database entires for a particular list, and have a running tally of certain attributes defined with the data entry -- i.e. a baseball player's name with stats entered for each year, and thereby selecting years you want to add from the database, it adds up stat columns such as homeruns and hits, and averages things out like batting averages. The running tally would ideally be visible on the page where the entries are being added
These are the main things I'm having problems with. The easier stuff has come...well...easier, but I want to make sure I'm approaching this problem from a solid angle so I don't end up wasting a ton of time. If anybody has some insight to offer, it'd be much appreciated.
So you need VB to programmatically talk to a database. It's pretty straightforward. I'd have to recommend using the latest and greatest VB.NET to do this however. Working through VB6 is an option, but there is much greater power and online resources available if you can use VB.NET.
On the other hand, most of what you want to do could be done entirely inside of Access.
humanity
09-01-2004, 03:11 PM
What I have access to in terms of applications is Access and Visual Basic 6, so VB.NET would be an additional investment if it would really be worth it.
Right, basically (along with a few other things -- this is just the problematic part of the program for me), I need to allow management of database entries -- adding entries, recalling entries and displaying them in table format, and adding entries together and taking sums of various attributes under those database entries and displaying the real-time sums on screen (based on entries being added and subtracted). I have no experience with Access whatsoever; would it be worth picking up for this?
I originally started messing with VB just for the benefit of the GUI ease. I could invest in VB.NET if it would be truly worth it to me. I've had some prior programming experience, like I said, so not only does this project allow me to to develop this application that will be so incredibly useful to me; it also lets me build on my programming capabilities.
Well, depending on how much programming you're planning on doing in the future, an investment in VB.NET could be worthwhile. Microsoft is trying to move everyone in that direction (I don't think it's even possible to buy VB6 anymore.) Further, there is a lot functionality in the base class libraries of .NET that would make this kind of database interaction relatively easy, though I don't have that much experience with VB6.
Then again, you can just build some front ends within Access (drag and drop) and leverage a lot of what Access already offers (e.g., exporting everything as a single table). In fact the first 3 items would really involve no programming. The final one would just be building the right query statements. This could all be done programmatically, but you'll spend a lot of time writing code for things that Access already does. Maybe a $20 Access programming book would be the best minimal investment here?
humanity
09-01-2004, 04:56 PM
Hmmm, not a bad idea. I'll have a lot to learn going the Access route, but if it'd be simpler, it makes sense to do that. I'm going to see if I can work something out with my college to get Visual Basic.NET, as the program I plan on writing would make a fine addition to our health studies department. It'd also help to have some programming knowledge back under me in case I come up with any other good ideas -- I'd have the resources to carry them out.
Could you recommend a book or tutorials covering any of the relative database management techniques I'd need to use to accomplish the setup I've been talking about? These could cover Access, VB.NET, or both, as I'm pretty confident I can square something away with VB.NET.
We've got an older version of this book (http://www.amazon.com/exec/obidos/tg/detail/-/0735619425/qid=1094132273/sr=8-4/ref=sr_8_xs_ap_i4_xgl14/002-6744499-3070462?v=glance&s=books&n=507846) floating around the office. It looks like a good starting place.
There are also a good number of online resources, like this forum (http://www.access-programmers.co.uk/forums/)
I can't be much more help in recommending books because I tend to do these things by trial and error and brute force. But I'm only on the DB side occasionally.
humanity
09-02-2004, 01:16 PM
Cool, thanks for the links.
UmneyDurak
09-03-2004, 05:09 AM
Many Many moons ago, when I was still in High School and taking VB class. I wrote program an address book in VB. I believe I used Crystal Report plug in. It makes setting up, and modifying DB pretty easy. Not sure if it's included with .NET, I really haven't done anything VB related in few years.
humanity
09-03-2004, 02:45 PM
They do indeed have it for .NET. I may research it a bit, as I'm still trying to figure out exactly HOW I want to set this up.
Stage 1)Scramble to learn a bunch of programming stuff
Stage 2)Figure out exactly what I need to learn :)
Stage 3)Learn it
jbarreto
09-08-2004, 10:14 AM
humanity, I like the way you're approaching this. Sounds like an interesting project too.
Not knowing too much about it though, let me make a few suggestions. And that's all they are, suggestions. I would recommend that you go to your local library and pick up a book on ADO.NET (you'd be using this if you decided on using VB) and breeze through a few chapters to get a feel for it. If you still feel confident about this project go ahead and get a cheap copy of Visual Studio off of eBay. [Hint: The Academic version is cheaper and includes VS .NET Pro].
It sounds like, (and rightfully so), you're leaning towards developing your own program and not relying on Access. Building your own app will provide more flexibility in the future. You could make your app accessible over the Web, switch to a better data source in the future, etc. Again, though, I don't know too much about your project and the department's needs.
But there are just so many compelling reasons to develop your own app instead of using Access, that it seems to me that the only reason for anyone to use Access is if they wanted something cheap and fast. I've always found it easier to write my own queries than to sit there trying to figure out Access' user interface and where to click.
Cheers,
J.
humanity
09-08-2004, 09:38 PM
Thanks, J. I really was leaning towards VB for many of the reasons you mentioned, namely distribution and having full control over more of my options to improve upon them down the road. I also feel programming is something that will transfer better to future projects, whereas I feel learning Access would only play a very limited role in future developments. I appreciate the recommendations, and I'll be checking for some ADO.NET materials as soon as I catch a break.
mmcdonal@aoc.gov
09-17-2004, 12:29 PM
I would suggest, if you would consider it, to build the database in Access, possibly with the SQL Express or MSDE back end, but you could use the Jet back end. This will give you experience with database design, which it seems you will need no matter which direction you go for final development.
You can compile your Access database into an mde file, which preserves it for distribution.
You can also program to it with VB.Net as your skills develop.
It seems to me that you need the foundational knowledge of database design, even before you approach the advanced skills of VB programming. You can learn VB by taking advantage of VBA, which is built into Access, and looks a lot like VB.Net (syntactially).
In any event, you can get some very sophisticated features from Access, in a very short time. You can get some foundational skills working in a friendlier environment than the .Net IDE, you can get happy with the .Net IDE working with Access VBA, you can compile your database in Access (with the developer version) and you can upsize it to SQL, MSDE, SQL Express, or other DBMS, and you can program to it as those skills develop.
Jumping in to VB.Net to design and program a personal use database will likely only lead to frustration and lead you to abandon the project. You could practically do what you want in Access with Wizards (good for beginners.)
I would suggest SAMS Alison Balter's Access books, O'Reilly's Access Cookbook, and Wrox' Access 2000/2002/2003 VBA programmer's reference to get started. Then look at some VB.Net books, and Programming Access with VB.Net, or SQL with VB.Net.
I think you wil find this path much more rewarding.
humanity
09-18-2004, 09:57 PM
Thanks for the input. I've been really busy lately and haven't had much time to research anything, so I'm sort of collecting every opinion I read here and weighing the pros and cons of each direction. I want to have a good plan before I fully jump into anything.
vbasic321
10-01-2004, 04:03 PM
humanity (and all),
I develop in VB.Net using Visual Studio.Net for the Energizer Bunny. I've come across 2 FREE tools for coding Windows Form applications and Web applications. Each is great for its intended purpose.
- Try out SharpDevelop (www.sharpdevelop.com). This in an open source IDE that allows you to code Windows Form apps in VB.Net and C#. It can import from and export to Visual Studio's ".sln" Solution file format. It also has tools for translating code snippets and entire projects between C# <==> VB.Net. The IDE is quite similar to VS.Net with mainly the most necessary tools. The latest version does code completion for C# and VB.Net.
[u]Web development - Try ASP WebMatrix (www.ASP.net, click on the WebMatrix icon at the top of the page). www.ASP.net is a Microsoft child site supporting ASP.Net development. The ASP.Net product team had an internal IDE they used for creating web controls. MS allowed the team to enhance the IDE and place it on www.ASP.net as a tutorial IDE, but it does a lot! WebMatrix supports coding in C# and VB.Net. The setup installs Microsoft's free Cassini -- development -- web server. So you can test your web apps on operating systems that cannot support Microsoft's IIS web server. (NOTE: IIS comes with Win-XP Pro and MS's server OSs, but in cannot run on Win-98 and Win-XP Home Edition.) With WebMatrix feeding pages to Cassini you can access MS-Access databases. Also, the WebMatrix download site also informs you how to download and install MSDE (MS SQL Server Desktop Edition). With MSDE you can create SQLServer compatible databases that run on the desktop only. This lets you create databases that you can later run on a host server that supports SQLServer.
SQL editor - Try the freeware version of WinSQL Lite (www.indus-soft.com/winsql). The freeware version lets me do so much that I currently have no reason to buy the Pro version. WinSQL works with and OBDC databases. There is also a free version that works with JDBC databases. WinSQL Lite lets you add parameters to you SQL queries. When you run your query you then enter required values into a dialog box with fields for each parameter in your query. WinSQL Lite has a Catalog feature that lets you examine tables, views and stored procedures. You can browse any table and double-click any row to edit it with a Record Update wizard which also builds a SQL statement for you as you make changes. WinSQL also includes a New Table Wizard.
vbasic321