Page 1 of 1

Plugin Reference problem 7.3.1

Posted: Wed Sep 29, 2010 12:00 pm
by drtech
I am trying to get my plugin back in working order after updating to 7.3 and can't figure out what is going on.

debugger says that
TreatmentNoteChanged
does not exist in this context on my hook for fillPtInfo in the chart


This is declared in the chartmodule as public but I can't seem to access it in my plugin. What is wrong?
///<summary>public for plugins</summary>
public bool TreatmentNoteChanged;

Re: Plugin Reference problem 7.3.1

Posted: Wed Sep 29, 2010 5:25 pm
by drtech
Another problem with my plugin:
Works fine on a test database, but with my complete database I get this error when trying to start the program with my plugin

"Column count doesn't match value count at row 1"

it does not seem this is coming directly from the code that I can find so I am having a hard time debugging this. What might the problem be?

Re: Plugin Reference problem 7.3.1

Posted: Wed Sep 29, 2010 6:34 pm
by jordansparks
For the first error, I think your configuration manager is not setup to compile everything for x86.

For the second error, I think you have added a column to some table in your database.

Re: Plugin Reference problem 7.3.1

Posted: Thu Sep 30, 2010 6:16 am
by drtech
how do I go about figuring out where the problem column is?

Re: Plugin Reference problem 7.3.1

Posted: Thu Sep 30, 2010 7:56 am
by jordansparks
A series of breakpoints to progressively narrow it down.

Re: Plugin Reference problem 7.3.1

Posted: Thu Sep 30, 2010 7:59 am
by drtech
ok, will have to experiment with that for the column problem.

compiling for x86 solved the other problems. I don't know how that got changed to " All CPUS"

Re: Plugin Reference problem 7.3.1

Posted: Thu Sep 30, 2010 8:01 am
by drtech
I removed my plugin table completely and my plugin does not try to access any other different database functions than the main program, so wondering why it would make a database problem with a column only show up when the plugin is enabled....works fine otherwise...

Re: Plugin Reference problem 7.3.1

Posted: Fri Oct 01, 2010 7:26 pm
by drtech
Narrowed it down to exactly in the code where the problem is but I still don't know what to do:

OpenDentBusiness.Plugin Line 46 ( plugin.Host=host;) throws an exception.
When I try to follow this code by stepping into it, it goes nowhere.

So the problem is when the plugin is trying to load but I can't really trace anything. Any hints on what I should be looking for as a source of my error here (seems to be before any code in my plugin is loaded, so is this something to do with registered plugins in my database? what table should I be looking at? (This does not happen with a demo database.)

Re: Plugin Reference problem 7.3.1

Posted: Fri Oct 01, 2010 8:22 pm
by jordansparks
Look at PluginBase.cs, line 12. It's virtual. So you're required to implement it in your plugin. For example, in the PluginExample, it runs ConvertPluginDatabase.Begin() in that location, and that's where startup queries are located. If you have done a similar thing, then one of your queries is bad. You might be able to spot which query by looking for a situation where column count won't match your query. You could comment out some of it until you narrow down where. Make sure as you do it that you end up with a fresh dll to test against.

Re: Plugin Reference problem 7.3.1

Posted: Sat Oct 02, 2010 6:09 am
by drtech
should the versions of my plugin match the versions of OD it is running on? Previously I had my plugin version 1.0.1.0, 1.0.2.0, 1.0.3.0, etc... Should it be 7.3.2.0 like the main program (which is how the example plugin looks) or does it make any difference?

Re: Plugin Reference problem 7.3.1

Posted: Sat Oct 02, 2010 7:00 am
by drtech
aaaahhhhggg!!!

I figured out that the whole time I was wasting my time trying to set breakpoints and change the code in the convertplugindatabase.cs and when I went to debug the project and run it, VS was not building a new verison of my plugin. I guess i have to manually rebuild it and then debug? man...that was frustrating.

Now, with a newly built version, I can comment out my queries and it runs perfectly. You were right, just was having a really hard time since it was giving me an old version of my dll! Now just to figure out what query is the problem...

Re: Plugin Reference problem 7.3.1

Posted: Sat Oct 02, 2010 11:06 am
by drtech
solved.

Is there any way to make sure a new version of your DLL (every project) is built every time you click start to debug an entire solution? (I thought it already did this, but I guess not..it is listed 3rd in my build order of OpenDentBusiness, OpenDental, PluginDrTECH)

Re: Plugin Reference problem 7.3.1

Posted: Mon Oct 04, 2010 9:44 am
by jordansparks
Just keep an eye on your configuration manager, especially when new releases come out. The next time this happens to someone, I'll be able to give them better advice. I did say, "your configuration manager is not setup to compile everything for x86". I guess the word "everything" was not prominent enough.

Re: Plugin Reference problem 7.3.1

Posted: Mon Oct 04, 2010 9:55 am
by drtech
Thanks for you help with it. When I go months without programming I have a hard time remembering how to fix these little "problems."