Unexpected exception in C# application

  • Thread starter Thread starter MyCatAlex
  • Start date Start date
M

MyCatAlex

Guest
I started with this post 3 days ago.

That problem was resolved thanks to KarenInstructor (Karen Payne). At the end of that post I explained that after that first problem was corrected, another more serious problem popped up in the same code.

In this case I get an exception after I press some buttons on a form. This is the exception:

System.MissingMethodException
HResult=0x80131513
Message=Method not found: 'Microsoft.SqlServer.Management.Common.ISfcConnection Microsoft.SqlServer.Management.Sdk.Sfc.ISfcHasConnection.GetConnection(Microsoft.SqlServer.Management.Sdk.Sfc.SfcObjectQueryMode)'.
Source=SQLServerSampleCodes
StackTrace:
at SQLServerSampleCodes.Form1.Fillcombo_SQLCodePackages_PG1() in C:\VCSharp_Projects\SQLServerSampleCodes\SQLServerSampleCodes\SQLServerSampleCodes\SQLServerSampleCodes\Form1.cs:line 120
at SQLServerSampleCodes.Form1.pushFillCombo_pg1_Click(Object sender, EventArgs e) in C:\VCSharp_Projects\SQLServerSampleCodes\SQLServerSampleCodes\SQLServerSampleCodes\SQLServerSampleCodes\Form1.cs:line 793
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at SQLServerSampleCodes.Program.Main() in C:\VCSharp_Projects\SQLServerSampleCodes\SQLServerSampleCodes\SQLServerSampleCodes\SQLServerSampleCodes\Program.cs:line 19

I've posted it before but got no help. My own lame search suggested that I may need a newer version of SMO or even SSMS. My version is 15 and the version 18 is available for downloads. I downloaded it and tried to run the exec file but got a strange message that this application cannot run on my computer. Why?

I followed another suggestion and downloaded a whole bunch of .msi files and tried to install them all.

1527894.png

Some of them sabotaged the installation for various reason, but some appeared to have been accepted. I saw no positive result on my application. This application worked for months without the dll files it now wants. What happened?

I REALLY NEED HELP, PLEASE HELP!

Thanks, - MyCatAlex

Continue reading...
 

Similar threads

M
Replies
0
Views
114
Mani25
M
G
Replies
0
Views
160
Graham Skan
G
N
Replies
0
Views
99
Narayan Pinamaraju
N
Back
Top