Welcome to MSDN Blogs Sign in | Join | Help

Jackie Goldstein wrote a helpful article about using the strongly typed Dataset and TableAdapter objects to write data access code.  This approach is much easier than directly using SQLCommand, SQLAdapter, and DataReader objects.

Article:
http://msdn.microsoft.com/vbasic/default.aspx?pull=/library/en-us/dnvs05/html/newdtastvs05.asp

Powered by the My.Blogs feature and Visual Basic 2005

 

Jackie GoldStein, a partner and friend of ours just created a great post talking about the new resources created by the MS Patterns and Practices Team. 

 

I think these are must have assets for any team thinking about an upgrade.  Here are a few more notes from my perspective: 

 

  • Migration Guide -- a very helpful book covering how a development team can approach a migration to VB.NET.  This has been compiled using best practices learned by actual customers, the MS field, and the VB Team members like Joe Binder.  Use this to help scope out and plan your migration. 

 

  • VB Migration Assessment Tool -- a tool that analyzes and reports helpful metrics when you?re considering a migration.  You get things like # of lines of code/modules/classes/forms, a dependency graph, cost/time estimation tool.  Use this to help scope out and estimate the resources needed for a migration. 

 

All resources are available for FREE download here:

http://msdn.microsoft.com/library/?url=/library/en-us/dnpag2/html/VB6ToVBNetUpgrade.asp

 

Please tell me what you think about these new resources. 

 

Best,

Paul

 

Powered by the My.Blogs feature and Visual Basic 2005

 

Have you seen the buzz about the Visual Basic Futures that have been announced today?

 

Paul Vick introduces project LINQ in his blog entry, and Alan Griver discusses the announcement in his blog entry.  You can think of this as giving you the ability to do queries over data (relational, xml, and objects) simply using the natural, dynamic Visual Basic syntax & experience.   You get the richness of the tool (Intellisense and validation) plus the flexibility of the forgiving language by default – strictness is an option. 

 

Here is a small snippet of sample code using LINQ to query over “Country” data (it should feel very comfortable for VB and SQL users):

 

Dim SmallCountries = Select Country _
From Country In Countries _
Where Country.Population < 1000000

 

Amanda Silver also just posted about a broader set of language features currently planned for the next version of Visual Basic (beyond VB 2005 / Codename “Whidbey”) – very cool stuff.  See her blog entry here

 

You can see the official announcements, articles, and even try out working samples via the new Visual Basic Future page on the VBasic dev center, thanks to our content strategist Brad McCabe and his recent post

http://msdn.microsoft.com/vbasic/future/

 

It’s very exciting to be part of the team who is going to take LOB app development to the next level of productivity. 

 

Enjoy.

 

Paul

 

 

Tag: PDC05

 

Hi –it’s been a while since I’ve written in my blog.  It’s been a pretty busy and “heads-down” summer for me (and the team), between working on our FY06 plans for migration, community engagement, and out-of-the box content.  We’ve also been getting ready for PDC, an upcoming event with our MVPs, and what’s that big event?  - oh yes, VS 2005 Launch!.   Somewhere in there I snuck in some vacation J  But I digress … 

 

            ***

 

Several members of the VB team will be at PDC this week, and I wanted to share our plans and highlights with you.  I know many of you won’t be going to the conference (me included!), so to the extent we can, we’ll be posting our content, highlights, and announcements online too. 

 

 

Here’s what has me excited:

 

- VB 2005 (Codename “Whidbey) sessions – we’ve put together some sessions that reflect what we think is the best of the best the “Whidbey” product has to offer.  This includes how you can use features like My, the IDE streamlining, new controls, and RAD data access to be productive writing Windows, Web, Office, and Mobile apps.  We also hit a greater depth with the content so you can take the product to the next level in your development. 

- VB 2005 @ PDC Resource CD– we’re rolling up all the “Essential Content” (books, articles, samples, starter kits, add-ins like Refactor! for Visual Basic, select PDC HOLs and presentations, Case studies, and more) and will be handing it out on CDs to attendees.  I’m also happy to announce we’ll be posting it on a “PDC05” section of our dev center tomorrow (9/13) AM.  Check back often here starting tomorrow:  http://msdn.microsoft.com/vbasic/pdc05/  

- VB Codename “Orcas” sessions – we will have some deep dive sessions on some of the future plans for the next product.  There are some killer features coming that build on VB 2005 and take it much further to be the ultimate productivity tool for business application developers.  Stay tuned for specifics.  And of course, this is our future thinking and it’s always subject to your feedback and related changes. 

- Special announcements – there are at least two big announcements the VB team will be making this week.  Stay tuned!  I’ll give you a hint, one if them is helping me write this entry ;)

 

 

Here are the team members attending PDC:

 

Joe Binder : Program Manager for My, RAD framework, and the Project system (also the man who planned our agenda at PDC this year)

Steve Lasker: Program Manager for RAD data design

Amanda Silver: Program Manager for Language/Compiler and other related areas

Paul Vick:  Technical Lead for Language/Compiler and other related areas

Patrick Darragh: Program Manager for ClickOnce and other related deployment areas

Jay Schmelzer: Lead Program Manager for VB 2005

Steven Lees: Group Program Manager for the VB PMs.

Jay Roxe: Senior Product Manager for VB

Brad McCabe: Content Strategist for VB and the VB Dev Center

Eric Gruber: Lead Tester for RAD data design

Abel Valadez: Developer for Language/Compiler and IDE areas

Alan Griver: Group Manager for VS Data, Fox, and other related RAD areas

Rob Copeland: Product Unit Manager for VB, Windows Forms, VS Data, Fox, and other related RAD areas

           

How to connect with the team:

 

Home base for all team members at PDC will be the Tools & Languages Track Lounge.  Make sure you trade contact info and get your own Resource CD. 

 

Also, we recommend you check out some of these talks done by team members and partners:

 

**Meet The VB Team**

Tuesday, Sept 13th  

6:30pm; Room - Tools/Language Track Lounge
                   -or-

Thursday, Sept 15th  

6:30pm; Room - Tools/Language Track Lounge. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Visual Basic: Future Directions in Language Innovation (TLN308)

Thursday, Sept 15th  

10:00 AM – 11:15 AM; Room 411

Speaker: Paul Vick

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Visual Basic: Under the Hood on Extending the 'My' Namespace (TLN414)

Thursday, Sept 15th  

2:15 PM – 3:30 PM; Room 501 ABC

Speaker: Joe Binder

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Tips & Tricks: Productivity Tips for the Visual Basic

2005 IDE (TLN12)

Friday, Sept 16th 

12:00 PM – 12:45 PM; Room 150/151 Hall E

Speaker: Jay Schmelzer

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Windows Forms: Occasionally Connected Smart Clients (PRS407)

Wednesday, Sept 14th 

11:00 AM – 12:15 PM; Room 408 AB

Speaker: Steve Lasker

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

CLR: Leveraging Dynamic Language Features (TLN317)

Thursday, Sept 15th 

3:45 PM – 5:00 PM; Room 408 AB

Speaker: Erik Meijer

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

The .NET Language Integrated Query Framework: An Overview (TLN306)

Wednesday, Sept 14th 

1:45 PM – 3:00 PM; Halls C & D (Petree Hall)

Speaker: Anders Hejsberg

 

 

And don’t forget, you should be able to find the best PDC content here by 9/13:

http://msdn.microsoft.com/vbasic/pdc05/

 

I hope to be telling you more this week. 

 

Enjoy, and we hope to hear from you.

 

Paul

 

 

 

I hope you don't have weekend plans this summer, because they're about to get delayed. :) There are two new fun starter kits just posted online.

Card Game Starter Kit: a complete blackjack game, customizable source code, and a framework to build more card games.

Shareware Starter Kit: the essential features you need to roll out your own shareware application.

You can check them out here: http://msdn.microsoft.com/vbasic/downloads/2005/starterkits/

Some thoughts about starter kits - I've been involved in starter kit development since their start a few years back. Overall, I think we've learned a lot about what our developers want and think they're getting better. Some highlights: I think the kits are more focused, smaller, easier to ramp up on, have better docs, and are easier to install. Not to mention, it's great to work on some features that can be released more regularly than the summer Olympics :).

Karen Liu and Dan Fernandez from the C# get extra credit for helping to create these kits - which I honestly think are the best yet. Hopefully, it's good for you to see more examples like this where the C# and VB teams work together to share best practices, and yet still build custom experiences for our developers.

I hope to hear what think about the evolution of our starter kits, and how these in particular work for you. Drop me a line if you have time. We want each one to get better and better. And we want to know how you use them.

Enjoy.
Paul

PS. who will come up with the best Texas Hold'em game in VB?

You may have noticed that some of our posts like "Adventures in Local Data ..." disappeared from the site last Friday.  From what I understand the MSDN blogs server was in a bad "pre-update" state when I posted.  I don't have an ETA for that to be restored.  So rather than waiting I just reposted.  I'm sooo glad I saved a backup! 

If you posted comments or noticed that I appeared to go dark - my apologies.  Please post your comments again. ;)  I'd like to hear what you think.

Cheers,

Paul

This week I’m kicking off a series of posts dedicated to learning programmers, enthusiasts and professionals who want to adventure in the land of local data using Visual Basic and SQL Express.  My goal is to explain new concepts in local data and to pass on tips and tricks along the way.  There are many new questions in this space, so please keep the feedback coming, and be patient for upcoming answers. 

You might be wondering why these adventures start on episode III. To be honest, I’m trying a psychological experiment to see if people searching for a certain hot new movie will instead find my features and begin a lifelong love of programming.  You’ll just have to tell me if that worked or not on you.   


Start By Telling Me the Basics

You are probably familiar with using databases in general.  That is, you have a machine that stores information in a structured way, and this is used by your applications to read and write to that storage.  Oftentimes these databases live on a machine, and your application makes an occasional connection to fetch data, and possible writes back some changes.

Local data refers to the same concept, but in this case it only refers to a database that resides on the same machine as the application.  Local data and local databases are everywhere busily managing your data behind the scenes.  Your contacts and messages are being saved to disk by your e-mail and IM software.  Your favorites are being saved by your Web browser.  Your songs list is saved by Media Player.  And even your phone is storing phone numbers.  You can have a collection of anything: books, movies, recipes, magazines, er, well anything.  More sophisticated applications like a cash register use both local and remote databases; local data is just used to save or “cache” data locally until the data can be safely transmitted to a server. 

      

Figure 1: local data is found in popular smart applications - media collections, media players, and smart phones

The challenge with writing an application that uses local data is that your users have high expectations for it to keep working in many situations!   It’s common nowadays to have an application that stores data, and then to move the application freely to other folders or even other machines.  For example, you want to simply share your collection of movies with your friends, so you toss files in a .zip and share it.  There is also now the ability to do a zero-impact installation of a program using ClickOnce.  In each case, users expect the local data to travel seamlessly with the application.  Here’s where local data sweetens the deal …


Local Databases are Just Files

Yes that’s the secret ingredient.  Your local database is a file at the end of the day, just like your word processing documents and your MP3s (you know, the ones you paid for).  This means you can move and copy databases to your heart’s content. 

The connection string is the glue that sticks application .EXE’s and database files together.  When the application tries to connect to database, it creates a connection using the string.  Here is a simple example. 

Connection string

Data Source=".\SQLExpress";AttachDbFilename="|DataDirectory|\DVDCollectionDatabase.mdf";Integrated Security=True;User Instance=True

File paths on disk

\My Documents\Visual Studio 2005\Projects\
 \MovieCollection1\
  [source code files]
  […]
  \Bin\
   MovieCollection1.exe  <-- application file
   DVDCollectionDatabase.mdf  <-- local database file
   DVDCollectionDatabase.ldf <-- database log file

This is easy to understand because a connection is simply made to a file via a file path.  The file path does look a little funky because it has the |DataDirectory| special sauce mixed in.  Think of |DataDirectory| as a variable that stores the actual value of the path where the database file lives.  In a simple Windows application this folder will be the same folder as the .EXE.  In a ClickOnce application this value will be the Application Data folder under Documents and Settings.  And in a Web application, this is the \Data\ subfolder in your Website.  You can thank this kind little |DataDirectory| variable for allowing your program to continue connecting to your database file dynamically no matter where you copy the folder. 

Black belt note – you can actually connect to any SQL server .MDF file using a connection string like the above, even if you treated the MDF file as a server database before.  Simply copy the file to your data directory, and change the connection string.  Now you’re going local, loco! 


SQL Express Takes it to the Next Level

One last point to make is that an engine is required handle database connections and processing the loading and saving of data (oftentimes called queries).  The best engine for local data in VB 2005 is SQL Server Express ("SSE" for short).  This is an evolved version of MSDE that has the features and benefits of SQL Server, combined with the lightweight features of engines like Access/Jet.  Not to mention, SQL Express has dramatically better setup and tools support than MSDE.  VB 2005 has excellent built-in support for SQL Express and installs it as a part of the product.  SSE is also completely free and can be installed standalone. 


Your Local Data App in 30 Seconds

I’ve been talking a lot, and now it’s time to get coding.  To get running in 30 seconds you will use the Movie Collection Starter Kit.  This is a fully working application for your collection of movies, complete with source code and tutorials.  It is included in every edition of Visual Basic and Visual Studio 2005.  You can download a much cooler Amazon-Enabled Movie Collection Starter Kit from our downloads page on the Visual Basic dev center:  http://msdn.microsoft.com/vbasic/downloads/2005/

To use it the starter kit:
1) Load Visual Basic or Visual Studio 2005
2) Start Page -> Create Project
3) Select Starter Kits in the left-hand-side tree (for Standard+ Editions only)
4) Click on Movie Collection Starter Kit and select OK
- your application source code will be loaded in a new project, and a tutorial will pop up –
5) Press F5 to run the application per the tutorial
6) Press the Add button in the Movie Collection and enter the details of your favorite movie. 
7) Close the application. 
8) File -> SaveAll to save your application to a folder (keep track of where you save it) 

That’s it - you have created your own application that stores your favorite movies. Movies are actually being stored to the DVDCollectionDatabase.mdf file, and can be seen every time you run your application. 

Now you can have some fun exploring how this works.  For example, open up the project folder for your application in Windows explorer.  Copy the application to your desktop.   The application continues to work and load your movies when you copy the application folder (under \Bin\) anywhere else, even to another machine. 


‘Til the Next Episode

We will explore the VB local data features in depth using the Movie Collection Starter Kit as our guide. 

If you want to get a jumpstart on the starter kit, check out the WebCast I did a few weeks ago on the Movie Collection Starter Kit.  All Webcasts are available here:  http://lab.msdn.microsoft.com/express/webcasts/default.aspx 

Until then, enjoy!

Paul

If you haven't seen the news yet, several editions of Visual Basic 2005 Beta and Visual Studio 2005 Beta are available for download.  Here is some information to get you started.  Please feel free to comment with any questions. 

Good reading:

Ken Getz wrote a great Sneak Preview article about several great features and benefits of the latest VB.NET:. It's a good read - I recommend you check it out. 

Downloads:

If you are brand new to Visual Basic, programming, or want a lightweight evaluation I suggest you download VB 2005 Express Edition Beta 2.  This is easy to learn and has many serious features including Intellisense, Debugging, unrestricted Compiler, My namespace, full access to .NET framework, local data access, and more. 

If you are a professional developer I suggest you download Visual Studio 2005 Standard, Professional, or Team System editions.  This contains the full features of Visual Basic needed in professional environments (e.g. remote data access and team development). 

If you have a pre-Beta 2 product installed (e.g. Beta 1 or CTP), you need to read this before download!  Note also, this is Beta software so it's a good idea to install this on a machine that you don't depend on.  Or you can use software like Virtual PC that isolates Beta software from the rest of your machine. 

Some other helpful resources:

VB 2005 Overview Article by Ken Getz - (Great Read!):
A Sneak Preview of Visual Basic 2005 BETA 2

VB Dev Center:
http://msdn.microsoft.com/vbasic/

VB 2005 Downloads:
http://msdn.microsoft.com/vbasic/downloads/2005/ 

Amazon-Enabled Movie Collection Starter Kit:
Amazon-Enabled Movie Collection Starter Kit 

The Amazon-Enabled Movie Collection Starter Kit is a Windows Form application that uses Amazon.com’s Web services to dynamically search for movie titles. This Starter Kit demonstrates technologies such as: calling XML Web services, databinding, application settings, local data storage using SQL Server 2005 Express Edition, and more.   

 

Let me know what you think. 


Best,
Paul

Hi everybody-

I’ve really enjoyed reading blogs and participating here and there in discussions.  I love that personal connection and dialog you have with so many people, only here.  Today is the day – I’m kicking off my own blog!

Meet Paul Yu ..

…You might need help saying my name – Paul Yuknewicz [Yook – na – vitch].  So Paul or Pauly, or PaulYuk, Yuk work for short. 

Here is some info about me.  I am one of the Program Managers on the Visual Basic team.  I’m currently working on many of the business and migration programs aimed to make developers successful on VB 2005.  I’m also very excited to announce that I’m picking up many of the community lead responsibilities for my friend and colleague, Robert Green.  These are the matters closest to my heart on the VB team, and I’m proud to be working on them with a brilliant team. 

I’ve had a fun, possibly eclectic, tour of duty before this.  My team was responsible for bringing you Visual Basic Express Edition, starter kits, and other exciting things for hobbyist and learning programmers.  I’ve also contributed to many of the data access features in Visual Basic and Visual Studio.  And before that I had fun being the sole PM for that little release called Visual Basic 2003.  It’s been 5 years now in all. 

I have the most fun in my work when I’m connecting with people (developers, business teams, my team, partners, enthusiasts, learning programmers).  Software for me is about enabling people and doing things that make our lives better.  I try to work on projects where I can make a difference, learn new things, and have fun.  I look back fondly on the first applications I wrote that did something real, and that feeling of accomplishment I had; I love it when others get to have that too. 

What’s coming next?

Visual Basic 2005 is really going to be an amazing product and it is here to stay.  In fact, I truly believe it’s the best product ever for line-of-business developers.  I think this is the one that brings the magic of VB together with amazing capabilities of the platform.   As I’ve been touring around regional users groups and visits people have told me (honestly), “Paul, you’re right -- this really is the one”.  There is an exciting time ahead and our community is an exciting community to be a part of.  This excitement is contagious. 

What I hope to do next is get a dialog started with all of you in the community.  I think we have a lot to talk about ranging from the real value seen in adopting VB 2005, to exciting things we’re all contributing to the community, to deeper discussions around the technology.  I think we have some big challenges we need to tackle as well – it will help me to hear about the challenges and issues you face and to discuss them here.

Longer term, I’d love to see us innovating on RAD to the extent that creating a killer program is not much harder than coming up with the killer idea itself.   Solving the technical problems should be easy. 

After hours

Here are some things going on outside of work.  I’ve had my skis shined up and ready to go all winter, but where is the winter?  And I’m now ready to go hiking and boating outdoors, but where is the sunny spring?  Nature don’t be cruel! 

I love music and films of all kinds.  This is a good fit for a rainy Seattle day. 

I’m juggling 3 or 4 projects that have to do with home media automation.  I’m a big time geek when it comes to digital audio/video, projectors and cool stuff like that.  I just picked up a 200 gb hard drive, and I’m trying to build a server that will integrate with my Audiotron, Rio Karma, and future devices to come.  I just re-ripped 200 CD’s for the 3rd time using WMA lossless.  Will this be the last?  J   I’ll be keeping an eye on avsforum.com.  Sync’ing all my media effortlessly and in high quality – that would be big. 
 

Talk to you soon

I’m looking forward to get to know all of you. 

--Paul


--Some quick links--

Visual Basic Dev Center on MSDN:  
http://msdn.microsoft.com/vbasic

Visual Basic 2005 Downloads:
http://msdn.microsoft.com/vbasic/downloads/2005

VBRun site for VB6 developers
http://msdn.microsoft.com/vbrun

VB Team Blog(s)
http://blogs.msdn.com/vbteam

 
Page view tracker