Wrox Programmer Forums
|
BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003
This is the forum to discuss the Wrox book Professional VB.NET 2003 by Bill Evjen, Billy Hollis, Rockford Lhotka, Tim McCarthy, Jonathan Pinnock, Rama Ramachandran, Bill Sheldon; ISBN: 9780764559921
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 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 March 26th, 2005, 10:06 PM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginning VB.Net 2003 - Chapter 16

When I try running the project it stops on the objDataAdapter.Fill(objDataSet, "authors") statement with an exception error. The error is:
An unhandled exception has occured of type system.data.sqlclient.sqlexception occurred in system.data.dll
Additional information:System Error.

I do not know what this could mean, Can you help???
I have also downloaded the code from this site and I still get the same error.
 
Old March 28th, 2005, 03:29 PM
Registered User
 
Join Date: Mar 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

objDataAdapter.Fill command inherently runs "connection" command.
I would suspect the problem with database connection. So
Add the following code to the line before objDataAdaper.Fill command and see if the connection works or not.

objConnection.Open()
objDataAdapter.Fill(objDataSet,"authors")


 
Old July 5th, 2005, 04:01 PM
Registered User
 
Join Date: Jul 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It may be your connection string, but it may also be your SqlDataAdapter SELECT command that is mis-typed. An incorrect SQL statement will result in the same error (as i found out).

 
Old July 13th, 2005, 11:36 PM
Registered User
 
Join Date: Jul 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am getting the exact same error but it happens when i try to update or delete in the same chapter 16. The program runs and then it stops throws that error you have and highlights the
objCommand.ExecuteNonQuery()
segment of code.

DOes anyone have any idea what to do? I can try running the query in enterprise manager but it is exactly the same as the books download code.

 
Old July 14th, 2005, 04:11 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

I assume that everything has been running up to Chapter 16. What example have you just completed and what page are you on?

Thearon
 
Old July 15th, 2005, 12:04 AM
Registered User
 
Join Date: Jul 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, Thearon
In Beginning VB.Net 2003 i have completed chapters 16& 17 and in Beginning VB.Net Databases i have completed Chapters 1-middle of 10 and also going through 14.

I think there must be some configuration problems with my SQL Server. I keep getting the same errors whether i use the code i wrote following the book or whether i use the download code.

For Beginning VB.Net 2003 Chpts16&17 i decided to delete all of "my examples" and then just download the code and take them out of their chapter folders and then put all of the programs (DataSetExample, Binding Example, Client-Server Processing, DataGrid Sorting, DataGrid Updates) in the wwwroot of Inetpub. I have sql server 2000 and IIS as well as vstudio.net 2003.

Let me take the example of the DataSetExample. I had Sql server off and ran the program. It didn't run. It stopped at the objConnection.Open(). I turned Sql server on and once again it stopped there. I checked in the sql enterprise manager/Tools/sql server configuration properties/security and made sure it was on authentication: sql server and windows. I changed the configuration string to server=(mycomputer's name) and i have a password for sa so i entered that. The Dataset example works just fine. I wrote this so you could get an idea what is potentially happening.

Now the BindingExample. Everything works fine in the form except the Update and Delete. I configured the sql server the way i did in the last example. When i try to use both the Update or Delete i get a "break" at the objConnection.ExecuteNonQuery() code. I make a break there and press start for the debugging and go "step into" and it goes to the Public Sub New() header--MyBase.New()--then it goes to the "Public Class Form1---Dim objConnection as sqlConnection=New SqlConnection("server=(what my computer name is);database=pubs;user d=sa;password=(my password for sa)")---then it goes to the Dim objDataAdapter as SqlDataAdapter = etc... etc... ---then it goes to InitializeComponent() in the Public Sub New()--then End Sub of the Public Sub New()-- and then it seems to have stopped and gone back to the form and... ok it seems to work now... let me try the update. THis is just strange it seems to work now for the first time after i went through the debugging but i didn't change any code or anything. The update and delete buttons now work so the BindingExample works perfectly.

The Client-Server Processing works just fine.
Well now i got the DataGrid Sorting to work...

I have a problem with the DataGrid Updates example though. When i run it i get a messagebox that says "Error while trying to run project: Unable to start debugging on the web server. The project is not configured to be debugged."
So i just go to debug menu and press "start without debugging". That brings up another error in a web browser with big red letters>
ServerError in '/' Application.

Configuration error
Description: an error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message:It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Then there is the source error with Line 39: <authentication mode="Windows"/> in red and below that the
Source File: c:\inetpub\wwwroot\DataGrid Updates\web.config

So that's where i am at right now. I have a huge lab due on MOnday about asp web forms using vb.net and i have to implement the security with COM, etc... My technical institute is a joke and they do not provide the guidance and resources to do these very complex and difficult labs yet, they expect you to do them. I'm forced to read hundreds of pages of books that aren't even part of the course just to understand concepts and coding practices. I have to start that lab and just stop reading for a while. If you can help with getting the DataGrid Updates working for me i would appreciate that Thearon. I am using a Datagrid in the lab. Thanks for your understanding and patience.
Bo


 
Old July 15th, 2005, 03:21 AM
Registered User
 
Join Date: Jul 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well i went to IIS and clicked on it and went to websites and then right-clicked on the DataGrid Updates icon. I went to properties and clicked create. The DataGrid updates example works now and i learned something new at 217am. Does anyone know of any good resources for learning about COM and implementing security with roles and such like
COM+ transaction and security services, for instance

 
Old July 15th, 2005, 04:42 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

Bo,

I assume from your last two posts that your code for the books are working fine now. As far as working with COM+ and security, you should consult the MSDN documentation that got installed with Visual Studio 2003. It not only provides help topics but also contains articles and white papers. Just look in the index for COM+. Google is also another way to find great information.

Good luck with your lab.

Thearon





Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning VB.NET 2003 Chapter 16 siegmeister BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 7 October 8th, 2012 11:29 AM
ASP.NET 1.1 with VB.NET 2003 chapter 1 subroger Wrox Book Feedback 2 November 11th, 2004 12:52 PM
Chapter 5 and 6 of Beg. VB.Net 2003 Koga BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 October 9th, 2004 05:02 AM
Beginning VB.Net Chapter 16 tjs206 BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 February 10th, 2004 02:28 PM
Beginning ASP.NET1.1 with VB.NET 2003 jhock7 Wrox Book Feedback 1 February 9th, 2004 09:34 AM





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