views:

60

answers:

2

Hi

I am facing a variety problem is explained below.

I have created a c# class library(Test.dll) using which i can enumerate the list of instances and databases of sqlserver. I have 2 Machines 1 dev machine and 2 one is test machine.

Now when i testing the Application in my dev machine it is properly behaving. But when i copy the application(exe file to ) test machine then it is failed to call the methods of the Interface which i hve written in Test.dll

When i debug app in dev machine the tli file is called by debugger and i have simply shared the folder which contains my source code to test machine.

and now i am debugging the app through test machine which does not contains source code. But i am afraid the function call to the methods which are in test.dll is failed.i dont know y this is happened...

How to fix this issue and how to make the application to run in all machines with the same effect.....

+1  A: 

Cute,

You seems to be missing the software link between your application and SQL Server.

If you are programming to access SQL Server through Native/OLEDB/ODBC drivers, you need to ensure that those drivers are installed. These drivers are part of Microsoft Data Access Components (MDAC) which is at v2.8 now (http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-b037-185d0506396c&displaylang=en).

When you install the development environment / SQL Server workstation components, these stuff got installed on their own.

Bala
I doesnot miss any software link.
Cute
Cute, I meant you needed these drivers for your software to work.
Bala
+1  A: 

You need to implement error handling in your application - some code that would programmatically check the error codes returned by COM methods, retrieve IErrorInfo if any and do something relevant - show the error message to the user, or write it into the log file.

To make debugging behave the same way on all machines you can't do much except copying the sources on each machine you want to debug.

sharptooth