Results 1 to 19 of 19

Thread: ASP.NET Tutorial

  1. #1

    Thread Starter
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    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.
    Attached Files Attached Files
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  2. #2
    Lively Member
    Join Date
    Aug 2004
    Posts
    94

    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 ?

  3. #3

    Thread Starter
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    Re: ASP.NET Tutorial

    What are you talking about?
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  4. #4
    Lively Member
    Join Date
    Aug 2004
    Posts
    94

    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.

  5. #5

    Thread Starter
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    Re: ASP.NET Tutorial

    Look in the database to see if the name is being inserted into the table.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  6. #6
    Lively Member
    Join Date
    Aug 2004
    Posts
    94

    Re: ASP.NET Tutorial

    Sorry, no.

  7. #7
    Lively Member
    Join Date
    Aug 2004
    Posts
    94

    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 ?

  8. #8

    Thread Starter
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    Re: ASP.NET Tutorial

    Set the default value of the InActive field to 0.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  9. #9
    Lively Member
    Join Date
    Aug 2004
    Posts
    94

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

  10. #10

    Thread Starter
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    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)
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  11. #11
    Lively Member
    Join Date
    Aug 2004
    Posts
    94

    Re: ASP.NET Tutorial

    Works fine, thanks !

  12. #12
    New Member
    Join Date
    Apr 2005
    Posts
    1

    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 !!
    ?

  13. #13
    Member
    Join Date
    Jun 2005
    Posts
    52

    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

  14. #14

    Thread Starter
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    Re: ASP.NET Tutorial

    Make sure "Admin" is a valid user on the Project database, if not create it.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  15. #15
    New Member
    Join Date
    Jul 2007
    Posts
    7

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

  16. #16
    New Member
    Join Date
    Jul 2007
    Posts
    7

    Re: ASP.NET Tutorial

    how can i create dynamic header and footer for website ?? in asp.net??

  17. #17
    Frenzied Member
    Join Date
    Feb 2004
    Location
    in the heart of the Mediterranean
    Posts
    1,143

    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
    ------------------------------------------------------------------------
    If an answer to your question has been helpful, then please, Rate it!

  18. #18
    Fanatic Member
    Join Date
    Dec 2009
    Posts
    904

    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

  19. #19
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width