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.
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.