Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Problem with database connectivity
 

Problem with database connectivity

Hello all software developers...... I have developed an application using vb.net 2008. It is an application useful for HR section of any organization. I am facing problems in connectivity with SQL Server 2005
My software works fine on my machine with sql server 2005 .....Everything functions correctly......
Problem starts when i try to install my software on some other machine. It is not being able to connect to the database server ie sql server 2005 on other machine

It prompts me with an error message saying that " An error has occured while establishing connection to the server. When connecting to sql server 2005, this failure may be caused by the fact that under the default settings sql server doesnot allow remote connections.(provider: Named Pipes Provider, error: 40 - Could not open a connection to the sql server). I have created the backup of my database and restored that database on other machine with sql server 2005 but it doesnt work. plz help me out .....
fireblade123  Tuesday, February 17, 2009 10:33 AM
Hi fireblade123,

did you configure the SQL Server to accept remote connections? SQL Server doesn't allow remote connections by default.
Have a look here:How to configure SQL Server 2005 to allow remote connections

Hope this helps,
franking
franking  Tuesday, February 17, 2009 12:26 PM

Hi Fireblade123,

Based on my understanding, at first both your application and the database reside on your machine and all works well. Then you install your application on another machine and the problemis that the appolicationcouldn'tconnect to the database that resides on your machine. If I'm off base, please feel free to let me know.

As Franking has pointed out, the SQL Server 2005 doesn't support remote connection by default. Follow the KB article Franking provided to support remote connection in your SQL Server.

In addition, if the database you want to use changes, e.g. moves to a new server, you need to change the connection string accordingly.

Hope this helps.
Ifyou have any question, please feel free to let me know.

Sincerely,
Linda Liu

Linda Liu  Thursday, February 19, 2009 7:53 AM
Hi

I think its because the software you developed has database on that Local system and from here you dnt have permission to access the database or the system is not connect to the Group network you are trying to access ...

And Check if you have not provided user name and password in the connection string then please add it ....



Thanks | Avinash Desai | Please mark the post as ANSWER if that Helped YOu
Avinash Desai  Tuesday, February 17, 2009 11:27 AM
Hi fireblade123,

did you configure the SQL Server to accept remote connections? SQL Server doesn't allow remote connections by default.
Have a look here:How to configure SQL Server 2005 to allow remote connections

Hope this helps,
franking
franking  Tuesday, February 17, 2009 12:26 PM

Hi Fireblade123,

Based on my understanding, at first both your application and the database reside on your machine and all works well. Then you install your application on another machine and the problemis that the appolicationcouldn'tconnect to the database that resides on your machine. If I'm off base, please feel free to let me know.

As Franking has pointed out, the SQL Server 2005 doesn't support remote connection by default. Follow the KB article Franking provided to support remote connection in your SQL Server.

In addition, if the database you want to use changes, e.g. moves to a new server, you need to change the connection string accordingly.

Hope this helps.
Ifyou have any question, please feel free to let me know.

Sincerely,
Linda Liu

Linda Liu  Thursday, February 19, 2009 7:53 AM

You can use google to search for other answers

Custom Search

More Threads

• BindingSource Filter max lenght and stack overflow
• Delete row and updating database through datadset
• [C#]datagridview cell end edit
• How to make the DataGridView to have rows for cols
• decrypt data and showing it on the datagridview
• Adding a record (where tableadapter is created in designer)
• How to Bind DataGridView to Dataset in Another Project
• CheckedListBox - how do I get checked items in ItemCheck event
• Merging a data table with another data table.
• Pen object scaling issue