Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 516947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:47:01+00:00 2026-05-13T07:47:01+00:00

got a problem here. Hope you can help :D The software I’m creating manage

  • 0

got a problem here. Hope you can help 😀

The software I’m creating manage simple movies information, this form in particoular should edit the data of a given movie.
Through the code below, a form is populated with the data gathered from the DB.
(“cinema” is a Dataset gloablly declared).

public short popolaModificaFilm(string titolo, ref TextBox txtAnno, ref TextBox txtCast, ref TextBox txtDurata, ref TextBox txtLocandina, ref TextBox txtRegista, ref TextBox txtTitolo, ref TextBox txtTrailer, ref TextBox txtTrama, ref ComboBox cmbGenere, ref ComboBox cmbNaz, ref CheckBox chkPellicola, ref CheckBox chkDigitale, ref CheckBox chk3d)
    {
        service.ricercaFilm(titolo).CopyToDataTable(cinema.film, LoadOption.PreserveChanges);
        dsCinema.filmRow film = cinema.film[0];
        txtAnno.Text = film["anno"].ToString().Trim();
        txtCast.Text = film["cast"].ToString().Trim();
        txtDurata.Text = film["durata"].ToString().Trim();
        txtLocandina.Text = film["locandina"].ToString().Trim();
        txtRegista.Text = film["regista"].ToString().Trim();
        txtTitolo.Text = film["titolo"].ToString().Trim();
        txtTrailer.Text = film["trailer"].ToString().Trim();
        txtTrama.Text = film["trama"].ToString().Trim();
        inserisciFilmCombo(ref cmbGenere,ref cmbNaz);
        cmbGenere.SelectedValue = film["genere"];
        cmbNaz.SelectedValue = film["nazionalita"];
        if ((bool)film["pellicola"])
        {
            chkPellicola.Checked = true;
        }
        if ((bool)film["digitale"])
        {
            chkDigitale.Checked = true;
        }
        if ((bool)film["tridimensionale"])
        {
            chk3d.Checked = true;
        }
        return short.Parse(film["id"].ToString());
    }

Through another button the user can update (in the dataset) the informations.
This is the method:

        public void aggiornaFilm(short id, string titolo, string regista, string cast, int anno, int durata, string trama, string trailer, string genere, string nazionalita, string locandina, bool pellicola, bool digitale, bool tridimensionale)
    {
        dsCinema.filmRow film = cinema.film.FindByid(id);
        if (!titolo.Equals(""))
        { film["titolo"] = titolo; }
        if (!regista.Equals(""))
        { film["regista"] = regista; }
        if (!cast.Equals(""))
        { film["cast"] = cast; }
        if (!trama.Equals(""))
        { film["trama"] = trama; }
        if (!trailer.Equals(""))
        { film["trailer"] = trailer; }
        if (!genere.Equals(""))
        { film["genere"] = genere; }
        if (!locandina.Equals(""))
        { film["locandina"] = locandina; }
        if (!anno.ToString().Equals(""))
        { film["anno"] = anno; }
        if (!nazionalita.Equals(""))
        { film["nazionalita"] = nazionalita; }
        if (!durata.ToString().Equals(""))
        { film["durata"] = durata; }
        film["pellicola"] = pellicola;
        film["digitale"] = digitale;
        film["tridimensionale"] = tridimensionale;
    }

When I try to use these functions Visul Studio spit the folowing exception:

System.NullReferenceException was unhandled
Message=”Object reference not set to an instance of an object.”
Source=”BusinessLogicalLayer”

I’ve noticed that the dataset (at the beginning of “aggiornaFilm”) is empty (so obviously yhe find method returns null) despite I’ve injected data through “popolaModificaFilm”.
Both the method (aggiornaFilm & popolaModificaFilm) are in the same class and are called in the same form.

Tnx for any help, sorry for my poor english.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:47:02+00:00Added an answer on May 13, 2026 at 7:47 am

    It seems like your service object does not return data correctly.
    You should check that the services runs correctly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 279k
  • Answers 279k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The NSUserDefaults object stores its data in memory, and is… May 13, 2026 at 3:28 pm
  • Editorial Team
    Editorial Team added an answer If I understand correctly, you have multiple types of buttons,… May 13, 2026 at 3:28 pm
  • Editorial Team
    Editorial Team added an answer You can use "errorlevel" in your batch file to get… May 13, 2026 at 3:28 pm

Related Questions

I'm working with iTextSharp and .NET 3.5 SP1 (in C#, as you can guess)
I've got a problem with Joomla 1.5.+, hope you can help me. I installed
I have put together a script which is very much like the flickr photostream
I have not marked this question Answered yet. The current accepted answer got accepted
I asked this question before, Here however I think I presented the problem poorly,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.