The Design-Time Developer

Second webcast: Data Access with Visual Basic 2005

Wednesday, April 12, 2005, 11 AM Central

Register here: Data Access with Visual Basic 2005

Resources for after today's webcast

Do you have other resources to share with the volkswebcast community?  Comment to this post with the resource that you find most useful when it comes to data access.

Based on your feedback*, after today's webcast, I will post the Q&A log from the webcast.

* My experiment is so far a success.  You have provided a request about how to improve the series and I am listening.  Please keep up the good work on your end by providing more feedback as our series develops.

Published Tuesday, April 11, 2006 11:31 PM by jacobcy

Comments

 

Data Access blog said:

Register to watch this:
MSDN Webcast: Data Access with Visual Basic 2005 (Level 200)

Start Time:  ...
April 12, 2006 3:25 AM
 

JohnM said:

We can open a connection and pass it to multiple dataAdapters before closing the connection. How is this handled with TableAdapters when we call queries from multiple tableAdapters?

Let's say I want to populate specific queries on a number of datatables.  I've configured the tableAdapters for each table with my parameterized queries.  Now, I want to use a single open/close on a connection.  With multiple dataAdapters, I open the connection first, use it while creating the DAs and then close it after the last.  How would this procedure translate to a TableAdapter since no connection object is exposed?
April 12, 2006 12:54 PM
 

The Design-Time Developer said:

At the end of my webcast on Data Access in Visual Basic 2005, the conversation turned from DataSets and...
April 12, 2006 1:21 PM
 

jacobcy said:

Q&A from today's Data Access with Visual Basic 2005 webcast

Q: Why you need to Refreshed Schema?

A: To ensure correctness across your data-bound controls when the underlying data store model has changed.


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

Q: With the new declarative data sources, how do we do try/catch blocks? I'm coming from ASP.NET 1.1 and wondering how I would trap an exception if the data source runs into an error. I've heard the declarative data sources fire events and we should handle those. Where can I get more info on these events?

A: Within the Properties window, you can access the DataSource events.


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

Q: I can not invoke the DataSource wizard/window in an ASP .NET web site. No "Data" menu unless I'm focused on my DB in the project. I'm missing something basic.

A: There is no Data Sources window in VS 2005 for web apps, just for Windows apps.


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

Q: I upgraded a large web app from 2003 to 2005. I use stored procedures exclusively to do my database updates, using sqlconnection and sqlcommand. Is there an easy or a recommended way to convert to using the new datasource?

A: You can actually map the stored procedures to the CRUD operations using the Configure Data Source wizard.


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

Q: Are there any issues to be aware of to install VS2005 on a machine that already has VS2003? Also... Any issues installing .NET 2.0 on a server that already has .NET 1.1?

A: VS 2005 and VS .NET 2003 do run fine side-by-side. both .net frameworks run alright side-by-side. With ASP.NET apps, you need to go into IIS and explicitly declare which framework to utilize to feed out web apps.


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

Q: Can you access an Access 97 database using the Access Datasource?

A: yes
April 12, 2006 3:21 PM
 

TonyV said:

I think the way you are running the webcast is interesting and good.  I took an online class one time where the professor required us to interact online via the message board by posting something useful at least 3 times a week.  The postings had to be done on different days so that the professor knew we were reading what others wrote at least half the week and helping each other by answering questions.

Interaction is a good thing, it is just the time and effort involves that fall short for a lot of people.  Unless there is some incentive that forces us to interact we normally stick to ourselves even though just the simple fact of networking is what should motivate us.  I have been learning the value of networking over the past few months.

Yes, I have a “network” of family and friends, but when I start talking about pointers, C#, VB or .NET their eyes glaze over.  Sometimes they think that I am talking about a disease.  Although, about 50% of my friends are in the industry and know what I am talking about, but they are at the same companies where I have worked.  That does not do me or them any good to learn what and how other companies use development tools of all kinds.

So, my goal has been to try to reach out to individuals at companies and industries outside of the financial development area where I work.  It is a slow process as you have to commit the time and effort which is hard when you have a family and house and all the other responsibilities that come along with life.

The webcasts have been good thus far.  I hope this experiment does work out well to help us communicate with each other.  Unfortunately, I do not have an answer for JohnM, but look forward to reading if someone else does.
April 14, 2006 9:07 AM
 

Kent Tegels said:

JohnM.

As TableAdapters are based on Strongly-Typed DataSets, my first thought would be to add a method to each named DataSet that allows to set the Connection of the _adpater field they define. However, if the DataSet gets regenerated for any reason, you'd probably lose that code so be cautious with that design.

A good place to follow-up on this question would be on the public newsgroup for ADO.NET. You can access that over the web at [0].

Cheers,
Kent

[0]: http://groups.google.com/group/microsoft.public.dotnet.framework.adonet?lnk=gschg&hl=en
April 18, 2006 9:00 AM
 

Ryan said:

When I try to set up a data connection for a VB 2005 project (using the Database explorer window), my only options are for connecting to local database files.  Is this a limitation of Visual Basic 2005 Express edition?
April 19, 2006 2:31 PM
 

jacobcy said:

Ryan,

Are you asking "local database files" versus "remote databases"?

Are you creating a Windows or Web application?  This sounds correct for a web application, which requires different approaches for adding web services or other database access.

See this article for more info on Windows application development - http://msdn.microsoft.com/coding4fun/inthebox/dataenabled/default.aspx.

Cheers,
Jacob
April 19, 2006 3:36 PM
 

Ryan said:

Yes I'm trying to connect to a database on a remote Server running SQL 2005 Express.  That article you linked too appears to only have instructions on installing SQL 2005 Express locally and connecting to a database that way.  I see no options through the wizard of creating a remote connection (must have a local .mdf to connect to).
April 20, 2006 10:54 AM
 

jacobcy said:

Hey Ryan,

Check out this link for details on the VS 2005 editions' feature comparison http://msdn.microsoft.com/vstudio/products/compare/.  As you surmised, VB 2005 Express does not include remote database access.  Visual Web Developer Express, however, does appear to support remote data access.  You could either download VWD or upgrade to one of the higher level editions of VS 2005.

Regards,
Jacob
April 20, 2006 11:57 PM
 

Ideefiks said:

I ran into the exact same problem as Ryan yesterday. Mine is a windows application so I don't know if downloading VWD will help, but will take a look at it. Glad to read this is indeed a limitation in the express editions because I kept thinking I must be doing something wrong ...

I do think this is one hell of a big limitation, the quote 'you can also easliy create data-enabled applications using SQL server express' really should include 'provided everything is on the same machine' which kind of takes away the essence ... cause SQL server will serve only locally ...

Regards,
Ideefiks
April 23, 2006 10:01 AM
 

jacobcy said:

Ideefiks, I think you make a good point.  The documentation does say that you can easily create data-enabled applications using SQL Server Express.  It could more clearly state that it must be locally hosted on your machine.  Please bear in mind that I consider myself to be a "design-time developer" as my blog title states, so I have to ask - isn't it fairly simple to deploy a SQL Server Express database with an application, thereby making the local development requirement much less of a limitation?
April 23, 2006 10:55 PM
New Comments to this post are disabled

This Blog

Syndication

News

This is the blog of Jacob Cynamon, Microsoft developer community champion (DCC) for Illinois, Indiana, and Wisconsin.


All postings on this blog are provided "AS IS" with no warranties, and confer no rights. All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer.

Developer Events

Other Microsoft Events TechNet Briefings
[IT Pros]


Connections
[Small/Mid-Sized Business Owners]


TS2 Seminars
[MS Partners]


MBS
[Business Professionals]


Stay up-to-date on developer happenings
Localized MSDN Flash Newsletter

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker