Which way to go? (New to VB.net)
Which way to go? (New to VB.net)
Which way to go? (New to VB.net)
Which way to go? (New to VB.net)
Which way to go? (New to VB.net)
Which way to go? (New to VB.net) Which way to go? (New to VB.net) Which way to go? (New to VB.net) Which way to go? (New to VB.net) Which way to go? (New to VB.net) Which way to go? (New to VB.net) Which way to go? (New to VB.net) Which way to go? (New to VB.net)
Which way to go? (New to VB.net) Which way to go? (New to VB.net)
Which way to go? (New to VB.net)
Go Back  Xtreme Visual Basic Talk > > > Which way to go? (New to VB.net)


Reply
 
Thread Tools Display Modes
  #1  
Old 12-21-2005, 05:24 PM
salcrocker salcrocker is offline
Newcomer
 
Join Date: Dec 2005
Posts: 15
Default Which way to go? (New to VB.net)


Hi Folks,

I consider myself an intermediate VB6 programmer. I am definitely not a professional by any stretch.

Here is what's going on...

I am a member of a non-profit organization and we have a website. Well, I thought that I would pick up VB.net and setup a secure database. I don't know how to proceed.

I was thinking about setting it up using the database control. After doing some reading, I have discovered that the author feels that using the ado control is handicapping the programmer. I have used the control in the past and not had any problems. The number of records should not grow to more than a few hundred over the course of a couple of years. The author's opinion is that the object should be created programmitically vice by using the control.

Another issue is implementation. I spoke with the folks who maintain the server about securing the database. They said that it needs to be a SQL database. Now, I'm confused because isn't SQL simply Structured Query Language? Is ADO not inclusive of SQL? What do I need to do specifically to make this database SQL?

What is the difference between a SQL server and SQL language? Do I create this using the .ASP web application or service? I would think it would be the web application.

Thanks in advance,
Sal
Reply With Quote
  #2  
Old 12-21-2005, 07:10 PM
aspnovice aspnovice is offline
Freshman
 
Join Date: Nov 2005
Posts: 30
Exclamation

Hi SalCracker,

Im pretty much a newbie myself to .Net but i think I can answer a couple of your questions.

SQL Database/Server is a Database sysyem that can be used like Access Database, Or Oracle etc, Its a Microsoft product and is generally pretty expensive.

I just bought VS2005 and SQL Express seems to have come bundled with VS and as I have never used it before I gave a few tutorials a go in creating and setting up the SQL Database.

I had a go with the new data controls and basically set everything up without a line of coding and hey presto there is data in my controls-datagrids,listViews etc- all very easy to do.

But like yourself I read that these Data Creation Wizards that you use are very slick but not very flexible for the programmer.

I created 2 databases in one tutorial from scratch in code using VS, one an Access database and one an SQL database they both work similarly from my point of view but im sure some of the proffesionals will point out the big differences I have yet to see.

I do know an SQL database is said to be superior online when dealing with large amounts of traffic, but IMO an access database will do just as well for a smaller site, Ive had an access database behind one of my sites with 1000's of records and multiple SP's and its ran fine for years without a glitch, granted I dont have the traffic bigger sites have mind.

Im not entirley sure on a secure server setup for the SQL database to protect your data, but with Access database you can simply store your database outside/below your WWW dir in a private directory which as far as im aware makes it secure from being downloaded.

I hope thats of some help for you.
Can I ask what books your reading just out of curiosity?
Seasons Greetings
Sb
Reply With Quote
  #3  
Old 12-21-2005, 11:18 PM
shaul_ahuvaWhich way to go? (New to VB.net) shaul_ahuva is offline
Ultimate Contributor

Retired Leader
* Expert *
 
Join Date: Jul 2003
Location: Camp Hill, PA
Posts: 1,992
Default

The primary reason most professional developers do not use the wizards and designer data components for production work is that it makes maintainability a nightmare (imagine that you need to change 20 forms because one field was added to the database), and any idea of discrete layers (i.e. data/business logic/presentation) is out the window. Deciding what technologies and specific components to use depends primarily on known business requirements as well as being aware of future requirements such as maintainability, scalability and extensibility - doing things quickly or "easily" for the first version may end up dooming the solution when unexpected upgrades need to be done...

When the DB people mentioned "a SQL database", they were most likely talking about a database hosted by Microsoft's enterprise database management system, SQL Server. Maybe it just laziness, or maybe people are getting tired of tongue-twisting product names (SQL Server Reporting Services comes to mind...).

ADO is simply a generic method of communicating with a database provider; it doesn't really care if what you are sending to the database provider of choice is valid SQL or not, only the database provider can understand SQL.

ASP.NET web services are not really designed to be interactive; they're designed to be a way to connect distributed applications. You would definitely want to create an ASP.NET web application if you want to have a web-based user interface.
Reply With Quote
  #4  
Old 12-22-2005, 05:23 AM
salcrocker salcrocker is offline
Newcomer
 
Join Date: Dec 2005
Posts: 15
Default

Thanks for the quick response!

You have shed some light, but there is still a bit of confusion.

1) What is a discrete layer?

2) What is scalability and extensibility?

3) If you create a form using VB can't you just add a field to the recordset or if you need to delete a datafield, can't you just delete it? (This is assuming that it is a data-bound control. ie-listbox, textfield etc.)

4) What book do you recommend for learning SQL database programming?

The book that I have is one that I bought a while ago when I was considering upgrading to VB.net and now I am finally reading it. It is Programming VB.NET: A guide for Experienced Programmers by Gary Cornell and Jonathan Morrison ISBN 1-893115-99-253995 and it is an old book, the copyright is 2002.

If I need to learn how to programmatically create these databases then I will, but right now it seems very complicated. This book goes on to say that there is even a book which discusses the advantages and disadvantages of using data-bound controls to access a database.

Thanks,
Sal
Reply With Quote
  #5  
Old 12-22-2005, 07:01 AM
shaul_ahuvaWhich way to go? (New to VB.net) shaul_ahuva is offline
Ultimate Contributor

Retired Leader
* Expert *
 
Join Date: Jul 2003
Location: Camp Hill, PA
Posts: 1,992
Default

#1 By discrete layers, I mean distinct (or separate) logical "layers" of application code. If you logically separate your user interface, business logic and data access code your application becomes much more maintainable, scalable and extensible.

#2 Scalability refers to how an application performs when demand is scaled up. Does it perform well with 10 users as well as with 1000? If not, the application is not very scalable...

Extensibility refers to how difficult it is to upgrade an application. If you create an order-tracking system, how difficult would it be to add billing functionality?

#3 If you use wizards, every form that needs access to the new field will probably need to be changed. The problems don't end there: what if your connection string changes or you need to add an additional parameter to a stored procedure call?

#4 I personally believe the best thing is to get a cert-prep book (not the quick study guides, but something similar to what is available from MS Press) and study that. I learned a lot by studying for and taking the exams. Look on Amazon for books related to SQL Server programming and database design/implementation.

It would probably be good to use the wizards if you're still learning .NET, as we all have to start somewhere and trying to take too much in at once can leave you dazed and confused Just keep in mind that there are alternatives out there that may be a good fit for other projects.
Reply With Quote
  #6  
Old 12-22-2005, 07:53 AM
wayneph's Avatar
waynephWhich way to go? (New to VB.net) wayneph is offline
Web Junkie

Retired Moderator
* Expert *
 
Join Date: Apr 2004
Location: D/FW, Texas, USA
Posts: 8,393
Default

This book has done wonders for me and Data Access: ADO.NET Core Reference. They are working on a new versions for ADO.NET 2.0 that hasn't been published yet. More than likely, I will be buying the new version as soon as it's out as well.
__________________
-- wayne, MSSM Retired
> SELECT * FROM users WHERE clue > 0
0 rows returned
Reply With Quote
  #7  
Old 12-22-2005, 06:38 PM
salcrocker salcrocker is offline
Newcomer
 
Join Date: Dec 2005
Posts: 15
Default

That clears up quite a bit. Now I will start my journey into the world of .net database programming. You guys are great. I spent quite a bit today at Barnes & Noble on two books, Murach's VB.NET database programming with ADO.NET, and Beginning VB.NET 2003 by WROX. Unfortunately I read your replies after my return.

Scalability alone is a great argument and incentive to dig in and learn.

I'm sure I will be back to discuss more issues later, but for now, a nice cup of coffee, light the fireplace and start reading.

Merry Christmas everyone and Happy Hanukkah!

Sal
Reply With Quote
  #8  
Old 12-22-2005, 09:56 PM
salcrocker salcrocker is offline
Newcomer
 
Join Date: Dec 2005
Posts: 15
Default

Cool...

Chapter 1

In addition to a network operating system that manages the functions of the network, the server requires a database management system (DBMS) like Microsoft SQL Server, Oracle, or MySQL. This DBMS manages the databases that are stored on the server.

More excerpts...

To make this communication between the client and the data source possible when a Visual Basic .NET application is being used, the client accesses the database via a data access API such as ADO.NET.

This is juicy stuff.

Sal
Reply With Quote
  #9  
Old 12-23-2005, 03:12 AM
shaul_ahuvaWhich way to go? (New to VB.net) shaul_ahuva is offline
Ultimate Contributor

Retired Leader
* Expert *
 
Join Date: Jul 2003
Location: Camp Hill, PA
Posts: 1,992
Default

Quote:
Originally Posted by salcrocker
...I spent quite a bit today at Barnes & Noble on two books, Murach's VB.NET database programming with ADO.NET, and Beginning VB.NET 2003 by WROX...
I've spent quite a bit of money on books at surplus stores and the like. I figured that I saved between $300 and $400 rather than buying them at large book stores like Barnes & Noble; those savings really mattered when I was still learning the basics
Reply With Quote
  #10  
Old 12-23-2005, 08:41 AM
salcrocker salcrocker is offline
Newcomer
 
Join Date: Dec 2005
Posts: 15
Default

Yea, I compared prices at Amozon after I bought and was unpleasantly surprised to see that they are quite a bit less. I should have done what Captain Kirk does,... "Shop and Compare before you buy! Brilliant!"

Back to reading.
Reply With Quote
  #11  
Old 12-23-2005, 08:44 AM
reboot's Avatar
rebootWhich way to go? (New to VB.net) reboot is offline
Keeper of foo

Retired Moderator
* Guru *
 
Join Date: Nov 2001
Location: Graceland
Posts: 15,614
Default

You can often get used books at Amazon for pennies on the dollar, and I've yet to buy a used book there that I could really tell was used.
__________________
~ Quod non mortiferum, fortiorem me facit ~

Avatar by lebb
Reply With Quote
  #12  
Old 12-23-2005, 09:24 AM
salcrocker salcrocker is offline
Newcomer
 
Join Date: Dec 2005
Posts: 15
Default

That's my new playground, the used book market. Reminds me of the old college days.
Reply With Quote
  #13  
Old 12-24-2005, 03:28 PM
salcrocker salcrocker is offline
Newcomer
 
Join Date: Dec 2005
Posts: 15
Default

Starting in with this book and working on a SqlDataAdapter Wizard and am having the following problem.

I am running the SQL Server Desktop Service Manager

The book calls for using a sample database which I downloaded from their website. In the wizard it says use the option "Select the database on the server" which has a listbox of databases. This option is available under the Data Link Properties' Connection Tab and is item#-3.

In order to access this database I am suppose to use the following script from a dos prompt: OSQL -S %COMPUTERNAME%\VSdotNET -E /i db_attach.sql

After using this script I do not see the Payables database as an option. I do however see several items in the listbox. I did a search for the item names on my hard drive and they are what appear to be database files in the C:\Program Files\Microsoft SQL Server\MSSQL$VSDOTNET\Data directory. The extensions are .mdf and .ldf

The SQL Desktop server has a green play arrow displayed and the connection when choosing other items is good.

To recap, I can't seem to get the Payables sample database onto the desktop server. The problem may be in the OSQL script.

Thanks for any advice!
- Sal -
Reply With Quote
  #14  
Old 12-25-2005, 04:42 AM
shaul_ahuvaWhich way to go? (New to VB.net) shaul_ahuva is offline
Ultimate Contributor

Retired Leader
* Expert *
 
Join Date: Jul 2003
Location: Camp Hill, PA
Posts: 1,992
Default

Did you install the sample files into their default location?
Reply With Quote
  #15  
Old 12-25-2005, 11:08 PM
salcrocker salcrocker is offline
Newcomer
 
Join Date: Dec 2005
Posts: 15
Default

Hi Shaul,

That was it, I just didn't have time to post that I had figured it out since it is Christmas. I appreciate the reply over the holiday.

---------------------------

Bigger issue:

I want to design a form on the web that will take in data from the applicant. Would I need to create a web application or just build the database and then put the files on the server after compiling?

Thanks off to bed, we had a great Christmas,
Sal
Reply With Quote
  #16  
Old 12-26-2005, 05:33 AM
shaul_ahuvaWhich way to go? (New to VB.net) shaul_ahuva is offline
Ultimate Contributor

Retired Leader
* Expert *
 
Join Date: Jul 2003
Location: Camp Hill, PA
Posts: 1,992
Default

Yes, you'll need to build a web app and use ADO.NET to access your database. After you have the web app and database built, you would need to either generate the SQL scripts to create the database on the server (if you have Enterprise Manager or Management Studio) or detach the database, copy it and attach it to the DBMS on the server. Then, of course, you would need to deploy the web application.
Reply With Quote
  #17  
Old 12-29-2005, 08:53 AM
salcrocker salcrocker is offline
Newcomer
 
Join Date: Dec 2005
Posts: 15
Default

Thanks Shaul

How did people put databases on the web before .net?

&...

How do you deploy the web application on the server? Is that similar to compiling? I'm sure I will get to that in my reading, but just curious.

Sal
Reply With Quote
  #18  
Old 12-29-2005, 09:21 PM
shaul_ahuvaWhich way to go? (New to VB.net) shaul_ahuva is offline
Ultimate Contributor

Retired Leader
* Expert *
 
Join Date: Jul 2003
Location: Camp Hill, PA
Posts: 1,992
Default

Databases are ultimately files, so the database file(s) need to be available to the DBMS. As long as you can copy the file(s) up and configure the DBMS to use the new file(s), you're good to go. Communicating with database providers has pretty much been the same since DAO (APIs have changed, of course).

Deploying (or installing) a web application can be as simple as copying the content files (css/aspx/ascx/config/js/html/etc.) and assemblies (dll) to the web server, and then (if needed) configuring the folder containing the web application as an IIS application. Alternatively, you can create a web deployment package that will copy the needed files and set up the application for you.

Compiling is the process of taking your VB code and converting it to intermediate language. Microsoft Intermediate Language (MSIL) theoretically, among other things, allows you to take a program written on a Windows machine, compile it and run it on an Apple machine. This is possible because MSIL is not specific to the operating system or hardware. When you run your program the Common Language Runtime (CLR) loads the MSIL, compiles it into native code specific to the operating system and hardware it is running on, and runs it.

I mention "theoretically" because in order for your program to run on a specific operating system, a Just-In-Time (JIT) compiler for that operating systems needs to be installed. The only JIT compiler I'm aware of for .NET is for Windows (although the Mono project supports other operating systems).
Reply With Quote
  #19  
Old 01-02-2006, 04:19 PM
salcrocker salcrocker is offline
Newcomer
 
Join Date: Dec 2005
Posts: 15
Default

Thanks again for the insight! Take a look at this website and let me know how you think it was done, regarding the programming language and methods.

www.papajohns.com

If you order side items, a picture comes up on that same line based on your selection, with a remove link. It is a very nice database application.

How did they do it? Java Junk? or .Net Stuff?

Sal
Reply With Quote
  #20  
Old 01-02-2006, 04:54 PM
salcrocker salcrocker is offline
Newcomer
 
Join Date: Dec 2005
Posts: 15
Default

One other thing...

Regarding forms and tasks -

I'm thinking about creating an application that I will distribute to three individuals that will take files from the server and fill in the database. I think this may be more efficient and a shallower learning curve for me.



Here is what I need to do:
Individuals will complete an online form.
- Retrieve the data from the form and store the information for later retrieval

Let the Committee members access/retrieve the data
- I now think the best thing to do will be to create and distribute an application to the committee members that will install on their hard drive and retrieve the data from the server. I believe it will look better too.


What do you folks think?

Sal

Last edited by salcrocker; 01-03-2006 at 05:55 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Which way to go? (New to VB.net)
Which way to go? (New to VB.net)
Which way to go? (New to VB.net) Which way to go? (New to VB.net)
Which way to go? (New to VB.net)
Which way to go? (New to VB.net)
Which way to go? (New to VB.net) Which way to go? (New to VB.net) Which way to go? (New to VB.net) Which way to go? (New to VB.net) Which way to go? (New to VB.net) Which way to go? (New to VB.net) Which way to go? (New to VB.net)
Which way to go? (New to VB.net)
Which way to go? (New to VB.net)
 
Which way to go? (New to VB.net)
Which way to go? (New to VB.net)
 
-->