-
1 Attachment(s)
ASP.NET Tutorial
I have created an ASP.NET tutorial. This tutorial is was designed in VS.NET 2003 using a SQL Server 2000 backend.
The tutorial contains the following.
1) A simple DML (Data Manipulation Layer) class containing common database functionality.
2) Examples of the following...
a) Datagrid Paging
b) Displaying images in a datagrid
c) Inserting/Updating/Deleting database records through stored procedure calls.
I have scripted out the database, so you can run the sql script in query analyzer and create all of the required database objects (tables, stored procedures, etc...).
I have also included a states.xls spreadsheet that can be imported into the "States" table (using DTS) once the database and all objects have been created.
If you have any questions let me know.
-
Re: ASP.NET Tutorial
Seems intresting, but I cann't do anything except surfing (add/edit doesn't work even if I don't receive any message) :-(
Any idea ?
-
Re: ASP.NET Tutorial
What are you talking about?
-
Re: ASP.NET Tutorial
Hmm, will give you an example.
When I start the application i receive the main screen, where i push "Departments". I receive a new screen whith one department (name 1). I try to add one, so i push "Add New Department". He asks me a name, i give in "2" and push on submit.
I receive the earlier screen of the departments, but only the "1" is on the screen. Same problem for positions and employees.
-
Re: ASP.NET Tutorial
Look in the database to see if the name is being inserted into the table.
-
Re: ASP.NET Tutorial
-
Re: ASP.NET Tutorial
I debugged it and in the function Query i get an exception : "Cannot insert the value NULL into column 'InActive', table 'VBFORUMS.dbo.Department'; column does not allow nulls. INSERT fails.
The statement has been terminated."
I modified this field so it would accept null value, but then i get this error :
"Cannot insert the value NULL into column 'DepartmentID', table 'VBFORUMS.dbo.Department'; column does not allow nulls. INSERT fails.
The statement has been terminated."
Do you see the problem ?
-
Re: ASP.NET Tutorial
Set the default value of the InActive field to 0.
-
Re: ASP.NET Tutorial
Still ""Cannot insert the value NULL into column 'DepartmentID', table 'VBFORUMS.dbo.Department'; column does not allow nulls. INSERT fails.
The statement has been terminated.""
-
Re: ASP.NET Tutorial
DepartmentID
Data Type: UniqueIdentifier
Default Value: (newid())
IsRowGUID: Yes
This should be the default of all of the Primary key fields in all three tables.
The default value for all varchar fields should be set to ('')
The default value for all int fields should be set to (0)
-
Re: ASP.NET Tutorial
-
Re: ASP.NET Tutorial
The problem still happens with the employee entry form.!
when i fill the form and submit it nothing is saved in the table.
i put the initial values of the table fileds as you said but i still face the problem !!
?
-
Re: ASP.NET Tutorial
HI
I have question about the tutorial I made database named project from query on the .sql file and it created the table and everthing fine.
When I access the webpages file in IE but when i Click on Department it takes forever then errors out. He is the error
Error: SQL Server does not exist or access denied.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open() at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at ASPNETTesting.DataManipulationLayer.Query(String strProcedureName) in C:\Inetpub\wwwroot\www01\ASPNETTesting\clsDML.vb:line 29
I check the permissions on the database and the user I add to it was on there with admin rights. looked at the clsDML.vb and seen this line where it connects to the Sql server.
Public strConnectionString As String = "Server=(local);Database=Project;User ID=steve;Password=jensen;"
So I changed it to this to try and tried to connect the sql server but it didnt work.
Public strConnectionString As String = "Server=(local);Database=Project;User ID=admin;Password=xdmzx3065;"
thanks for the great tutorial so I am no expert but just trying to learn about asp.net with Sql server
Anddmx
-
Re: ASP.NET Tutorial
Make sure "Admin" is a valid user on the Project database, if not create it.
-
Re: ASP.NET Tutorial
i want to create a new website on which user can serch for job in short job serching web site .for this website i can't get idea what will be the different tables,database etc.. is anyone help me!!!
-
Re: ASP.NET Tutorial
how can i create dynamic header and footer for website ?? in asp.net??
-
Re: ASP.NET Tutorial
Hi I have downloaded ASP.net testing tutorial and built the conversion alothough it says that .vbproj was not converted successfully.
When I try to run the I get .
an error message saying :
Cannot open the file
How do I proceed from there please?
I am using VS 2005 . Thanks
-
Re: ASP.NET Tutorial
i am also having the same problem..
is the start up page properly defined?
or need to set it up???
please help
-
Re: ASP.NET Tutorial
Hey,
With all respect, this tutorial is targeted at an older version of SQL Server and Visual Studio. Unless you are specifically using these versions, I would suggest you look elsewhere for samples, there are plenty available.
Gary