Wrox Programmer Forums
|
BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5
This is the forum to discuss the Wrox book Beginning Visual Basic 2005 Databases by Thearon Willis; ISBN: 9780764588945
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 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 April 8th, 2010, 02:01 PM
Authorized User
 
Join Date: Aug 2005
Posts: 88
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Thearon,

While I hate to do so, I'm admitting defeat.

I'll continue using the WDABase class (which I think is a great idea) for all data functions other then the DataGridView.
Thank you for trying to help, Your books do a great job for amateurs like me.

Milt
 
Old July 25th, 2010, 02:02 PM
Authorized User
 
Join Date: Aug 2005
Posts: 88
Thanks: 4
Thanked 0 Times in 0 Posts
Default Using WDABase Class With DataGridView

Thanks, Thearon, for the help you gave me on this problem. This code works perfectly:

GetAppDataPath()
Dim strTable As String = "tblBooks"Using oData As New wdaBase
oData.SQL = "qryBooksGridSelect"oData.InitializeCommand()
oData.OpenConnection()
oData.da = New OleDbDataAdapter(oData.cmd)
oData.ds = New DataSet
oData.da.Fill(oData.ds, strTable)
dgv.DataSource = oData.ds
dgv.DataMember = strTable
dgv.Columns(0).Width = 35
dgv.Columns(1).Width = 200
dgv.Columns(2).Width = 250
dgv.Columns(3).Width = 250
End Using

The only question I have relates to the line
"oData.da = New OleDbDataAdapter(oData.cmd)"
I need to insert the Import the OLEDB statements

If I use this line instead...
oData.da = New odata.da(oData.cmd)

I get the error "Type odata.da' is not defined".

Since I am using the database class and da is declared in the class I don't understnd why this is not accepted, and hopefully you canhelp me understand.

Thank you for a great book and the help you have given me in this forum.


Milt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing an event from a class to the class that created it? dcellis1950 Visual C++ 3 October 6th, 2009 11:14 AM
Custome RowHeaderCell Class for DataGridView prashantha Pro Visual Basic 2005 0 November 13th, 2006 12:25 AM
wdabase class cf2006 BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 7 July 15th, 2006 05:19 AM
Chapter 6 / Appendix B - Admin / WDABase Classes scgtman BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 3 May 20th, 2006 05:54 AM
Appendix B - WDABase class scgtman BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 2 May 20th, 2006 05:45 AM





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