Hi, I am create new setup for my project(.exe). While i am click on exe it will throws an error microsoft has encounred a problem we need to close it. System.data.sqlclient.sql what happens , i am installed in another PC it will work fine . I have allready .netfrmawork an d windows installer on my pc . can anybody help me please.

Maybe it's throwing an exception you didn't catch?

Have you install the .Net Framework on the machine you are runing your application and check all the connection you have open you puttin in try block and handled catch and finally block and accroding to me close the connection in finally block.
If you get your Answer mark this thread as Solved

It's not an coding exception if is it then it will not run on any another machine.
When i click on exe it will open registration form on load event i have getting the hardware information i have already use try catch block but its not going to load event.

Can u mention the Proper Exception which u have got

Yes. I have used Try... catch..

I am asking what error message u r getting after running

Here is the error

Microsoft has encounter a problem.

EventType : clr20r3 P1 : onlinetestseries.exe P2 : 1.0.0.0
P3 : 4e685a02 P4 : system.data P5 : 2.0.0.0 P6 : 471ebf27
P7 : 272d P8 : 29 P9 : system.data.sqlclient.sql

Does the database you're trying to connect to exist and do you have the login details correct? Are you storing your connection string in your app.config file?

No i am storing my connection string in one class file connection.cs, is this make any change.

I just wondered because it could mean that the connection tried to initialise from the App.config before your form loaded.

Is your database present and configured correctly on that computer?

Thanks all.... this problem is occurred because of sql express instance was not created. You must have install the sqlexpress.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.