Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 9th, 2007, 01:44 PM
Authorized User
 
Join Date: Nov 2006
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ef1196
Default

Don't put quotes around the keyword Nothing

Example:
Me.cmbCarrier.DataSource = Nothing



Best Regards,
Earl Francis
 
Old May 9th, 2007, 01:45 PM
Authorized User
 
Join Date: Dec 2006
Posts: 70
Thanks: 0
Thanked 1 Time in 1 Post
Default

Boy, do I feel foolish.

Thank you!

 
Old May 9th, 2007, 09:34 PM
Authorized User
 
Join Date: Dec 2006
Posts: 70
Thanks: 0
Thanked 1 Time in 1 Post
Default

Earl, Doug, Brian,
thank you again for all your help.

It's so close to working the way I want, but
Code:
Me.EquipmentTableAdapter.Update(Me.APC_WirelessDataSet.Equipment)
Me.EquipmentTableAdapter.ClearBeforeFill = True
Me.EquipmentTableAdapter.Fill(Me.APC_WirelessDataSet.Equipment)
doesn't work exactly the way I thought it would.
The Fill clause shows all the equipment serial numbers ...
If I comment it out, the rows I just scanned in still show in the datagrid.

What am I missing?
Karen

 
Old May 10th, 2007, 06:46 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I *think* you will probably want to do something like this:

Me.APC_WirelessDataSet.Equipment.Clear()

as this line

Me.EquipmentTableAdapter.ClearBeforeFill = True

Doesn't clear your datasource until Fill() is called.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old May 10th, 2007, 09:54 AM
Authorized User
 
Join Date: Dec 2006
Posts: 70
Thanks: 0
Thanked 1 Time in 1 Post
Default

Doug,
thank you. It works wonderfully.

I am trying to learn as much as I can about datasets, tableadapters, etc. I can't find a source that really answers my questions in a way that makes sense to me. I am so grateful for this forum.

I just posted over in the Beginning VB Databases forum asking about updating individual columns in a row/dataset.
What I didn't mention was that I'm not using a datagrid. I'm not sure if it makes a difference or not.

Thanks again,
Karen






Similar Threads
Thread Thread Starter Forum Replies Last Post
how to initialize arrays in c# apoorvchandra C# 2005 1 July 12th, 2008 08:35 PM
Can't initialize variables auguri Visual Basic 2005 Basics 1 March 26th, 2007 05:05 PM
failing to initialize the enterprise manager caojun SQL Server 2000 2 May 9th, 2005 08:23 PM
initialize variables junemo Pro PHP 2 July 15th, 2004 03:04 PM
initialize serial port miguel.ossa C++ Programming 0 February 13th, 2004 01:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.