Re: My Book is Incomplete Regarding SQL Commands ;-(
- From: "pooba53" <pooba53@xxxxxxxxx>
- Date: 20 Mar 2007 20:13:03 -0700
I appreciate the book suggestions. Thanks.
What I really need is some sample code that addresses my original
question. I've spent enough $$$ on books presently and they were all
supposed to be wonderful ;-)
-Dan
On Mar 20, 5:59 pm, "William \(Bill\) Vaughn"
<billvaRemoveT...@xxxxxxxxxx> wrote:
I agree, David's book is great. I wrote a book that maps to the original
Visual Studio but not to VS 2003.
Visual Studio (VB.NET) has code generators in each of its versions that
automatically generates the code (including the SELECT query) when you drag
and drop data tables or Data Source tables on the form. One approach I use
in my book is to dig into the generated code (click "show all files" in the
solution explorer). Here you will see a lot of code--used to
Create a Connection object and pass in a ConnectionString to address
your database.
Create a DataAdapter or TableAdapter (depending on the version) to
manage the database table you reference.
Create a set of Command objects--one each to Select, Insert, Update and
Delete rows (SelectCommand, InsertCommand etc.)
Use the DataAdapter or TableAdapter Fill method to execute the
SelectCommand, return a rowset and populate a DataTable
Bind the DataTable returned to the TextBox or DataGridView control(s) on
your form.
Build the UI needed to navigate and launch the Update method on the
DataAdapter that posts changes to the database (and call the InsertCommand,
DeleteCommand and UpdateCommand).
Yep, my latest book can help too, but mostly if you're targeting SQL Server
(any version).
There are also walkthroughs in the documentation that can help as well.
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speakerwww.betav.com/blog/billvawww.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visitwww.hitchhikerguides.netto get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
"Jim Brandley" <Jim.Brand...@xxxxxxxxxxxxxxxxxx> wrote in message
news:eVSeorzaHHA.2300@xxxxxxxxxxxxxxxxxxxxxxx
David Sceppa wrote a book called "Microsoft ADO.NET". It was a big help to
me when I was getting started. He has lots of examples and pointers for
performance.
"pooba53" <poob...@xxxxxxxxx> wrote in message
news:1174426969.138413.75590@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The book I'm learning VB .NET from barely scratches the surface of
ADO.NET. I have a working application that has a database connection
(to Access), a data connection OlDbConnection1, a data adapter
OlDbDataAdpater1, and my text boxes are working as expected when bound
to the Access fields. The book has "Wizards" do all the "magic".
What my book does NOT cover is how to use the above items to generate
sql commands and capture the results. Sort of pitiful.
I know SQL and have used it with Linux, PHP, and MySQL. I just don't
understand the most common thing in the realm of getting information
from a database using VB .NET and VS 2003.
I do have a dataset created too called "Data1".
I already have everything set up, I just don't know the syntax to
create a select statement and capture the results!
Thanks for putting up with my dunce cap...
-Dan
.
- Follow-Ups:
- Re: My Book is Incomplete Regarding SQL Commands ;-(
- From: Shawn B.
- Re: My Book is Incomplete Regarding SQL Commands ;-(
- From: RobinS
- Re: My Book is Incomplete Regarding SQL Commands ;-(
- References:
- My Book is Incomplete Regarding SQL Commands ;-(
- From: pooba53
- Re: My Book is Incomplete Regarding SQL Commands ;-(
- From: Jim Brandley
- Re: My Book is Incomplete Regarding SQL Commands ;-(
- From: William \(Bill\) Vaughn
- My Book is Incomplete Regarding SQL Commands ;-(
- Prev by Date: Re: Refresh not working on TableAdapter
- Next by Date: NullReferenceException on DataSet.Clear. dotnet 2.0 bug ?
- Previous by thread: Re: My Book is Incomplete Regarding SQL Commands ;-(
- Next by thread: Re: My Book is Incomplete Regarding SQL Commands ;-(
- Index(es):
Relevant Pages
|
Loading