Application not submitting to database

Discussion in 'Site Programming, Development and Design' started by AEllebute, Oct 4, 2011.

  1. var user = new ClientUser();

    user.CompanyAddress = txtAddress.Text.Trim();
    user.CompanyName = txtCompany.Text.Trim();
    user.DateCreated = DateTime.Today;
    user.Email = txtEmail.Text.Trim();
    user.Firstname = txtFirstname.Text.Trim();
    user.Password = txtPassword.Text.Trim();
    user.Phone = txtPhone.Text.Trim();
    user.Role = UserRole.Client.ToString();
    user.Surname = txtSurname.Text.Trim();
    user.Username = txtUsername.Text.Trim();

    bool exists = false;

    if (new UserFactory().RegisterClientUser(user, out exists) != null)
    {
    lblMessage.Text = "message";
    lblMessage.ForeColor = System.Drawing.Color.Blue;

    new MailerDaemon().SendEmail_ClientUserRegistration(user);
    Clear();
    }
    else
    {
    if (exists)
    {
    lblMessage.Text = "message";
    lblMessage.ForeColor = System.Drawing.Color.Red;
    }
    else
    {
    lblMessage.Text = "message";
    lblMessage.ForeColor = System.Drawing.Color.Red;
    }
    }
    }

    running this locally, it works perfectly. But when uploaded on website, doesn't work. and the database connection is accurate. Need urgent help please.THanks
     
  2. Do you want this application to store new data to the database or sending you mail notification when a new user subscribe? If the first, look in the store procedure. If the later attach the detail for mail class also (SMTP detail) newMailerDaemon().SendEmail_ClientUserRegistration(us er)
     
  3. I realised that when i use stored procs, it works, but when i use Nhibernate, it doesnt. is it that Winhost doesnt support apps running with Nhibernate tech?
     
    Last edited by a moderator: Oct 14, 2015
  4. Last edited by a moderator: Oct 14, 2015

Share This Page