Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET 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 2nd, 2007, 11:40 PM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gegonut
Default Very simple variable assignment question

I'm aware that this is surely very amateurish, but I am having a real problem trying to simply assign an Integer-type variable in VB.NET 2003 to a field in an Access database. I have tried things like:
Code:
Dim modValue As Integer

modValue = dsCharacterTables.tblPCs.fldStrColumn
and I get an exception error. I also don't understand why, if my field is named, for example, fldStr, I can only select fldStrColumn. I am very new to database programming and would greatly appreciate any help. Thank in advance!

 
Old May 3rd, 2007, 10:41 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Usually you work with a dataset through the various collections contained within it. Something like this:

dsCharacterTables.Tables("tblPCs").Rows(0)("fldStr Column")

-Peter
 
Old May 3rd, 2007, 11:34 AM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gegonut
Default

Thanks very much! That worked perfectly.






Similar Threads
Thread Thread Starter Forum Replies Last Post
simple question petergoodman XSLT 8 July 18th, 2008 07:57 AM
Simple question VBAprutser VB How-To 2 August 20th, 2007 06:00 AM
Simple (for most) Variable Question clareE XSLT 2 December 31st, 2005 08:42 PM
Simple Question dinosaur_uk VB.NET 2002/2003 Basics 1 September 10th, 2004 09:43 AM
Simple Question MSK888 C# 4 August 1st, 2004 12:12 AM





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