Problem Connecting to Database

Stompi2004

New member
Joined
Sep 3, 2005
Messages
3
Programming Experience
1-3
I have come across a very strange error when running my VB.NET application!!

Scenario:

I have a VB.Net application which i built on my own pc which has VS2005 and SQL Express 2005 installed. Now this application needs to run on a pc with niether of the two installed, which seems logical...right?

The App connects to a databes within the DataDirectory and works fine when i run it from my pc!

But once i have deployed the app on a different machine and ru it, it tells me that it cant connect to the database :Error 26: When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL server does not allow remote connections. (Error locating Server/Instance Specified)

But there is no SQL Server installed on the client pc. and im not trying to connect remotely???

I have no idea what to do or where to look to solve this!!

Can anyone help me.. This is straing to become urgent for me to fix this!!
Thanks in advance
:confused::confused:
 
ClickOnce deployment have the prerequisite SQL Server 2005 Express included by default when this datasource is added to app. Maybe you deselected it by incidence?
 
Thanx, but im not using clickonce deployment in this situation!

HAve not yet created a deployment project for my solution, so at the moment im just copying the bin files to the client pc, (Including the database in the correct directory), and then run the .exe file.

Any other suggestions maybe?
 
how is your database connection defined??

I.E. say your PC is called Programmer1 .

If your connection is set to \\Programmer1\ .... \... instead of \\Localhost\ ....\...

then when it's on another PC, it will be looking for the database to reside on \\Programmer1.

Does that make sense?
 
Back
Top