Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem in 2.4 calling biz object with multiple paramete
Message
 
À
10/07/2008 19:08:15
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01330315
Message ID:
01330773
Vues:
19
Tim,
You must have brought me some good karma because when I went back to it to try to recreate the problem (I've been working on alternative solutions), not only did I not get that error but I was able to get it to work. Not a bad way to end the week. I'm still looking into another way to do this with everything handled in procedures but I'll start a separate thread for that. I have set things up to set through the MM framework code before, although I'll have to look up how to do that since it has been quite a while. Thanks for your help.

>Linda,
>
>Could you post the full stack trace? It is hard to tell which object it is complaining about not being instantiated. Also are you aware you can set your enviornment up to also step through the MM framework code? In some of these cases it is helpful.
>Tim
>
>>I have a form that allows the users to enter quite a few variables for selection criteria. Those are passed to a method in the business object. I am getting an error "Object reference not set to an instance of an object" when I try to run the form. I have checked to make sure that the class name matches and that there are valid values in each of the parameters being passed. I set a breakpoint to verify that the values are correct. The error occurs immediately upon executing the call to the business object. I have also tested the business object code in the test bench and it works correctly there. This code worked before switching to MM .NET 2.4. I have run out of ideas for things to try next. Any help is greatly appreciated.
>>
>>The code from the form and business object are listed below.
>>
>>Form code
>>
>>    public partial class MedicalReviewMaint : mmBusinessForm
>>    {
>>        private MedicalReview oMedicalReview;
>>        private Client oClient;
>>        private Patient oPatient;
>>
>>        /// <summary>
>>        /// Constructor
>>        /// </summary>
>>        public MedicalReviewMaint()
>>        {
>>            oMedicalReview = (MedicalReview)this.RegisterPrimaryBizObj(new MedicalReview());
>>            oClient = (Client)this.RegisterBizObj(new Client());
>>            oPatient = (Patient)this.RegisterBizObj(new Patient());
>>
>>            InitializeComponent();
>>. . .
>>
>>        }
>>
>>        private void btnLocateRecord_Click(object sender, EventArgs e)
>>        {
>>             //Get medical review records meeting selected criteria
>>            this.oMedicalReview.GetMedReviewsBySearchCriteria(this.cboLocClient.SelectedValue.ToString(),
>>                this.txtLocClientPatientId.Text,
>>                this.txtLocLastName.Text,
>>                this.txtLocFirstName.Text,
>>                this.txtBegDate.Text,
>>                this.txtEndDate.Text,
>>                this.cboLocReviewBy.SelectedValue.ToString());
>>
>>
>>
>>business object
>>
>>[Code to build command string and parameter array.  MRSqlCmd is a StringBuilder, ParamList is a parameter array]
>>
>>
>>            this.GetDataSet(MRSqlCmd.ToString(), CommandType.Text, ParamList);
>>            return this.Entity;
>>
>>
Linda Harmes
HiBit Technologies, Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform