12 Replies - 1486 Views - Last Post: 07 September 2013 - 09:10 AM Rate Topic: -----

#1 dave_mark  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 15-March 13

provider: SQL Network Interfaces, error: 26 – Error locating Server

Posted 03 September 2013 - 01:02 AM

Hi Everyone,
i am new to sql server, i have a program in vb.net then my sql server 2008 is installed in my computer.. my program works fine, it can connect to the sql server 2008. when im done with my program i install it to other computer in my company. when i install my program its going fine but when the time my program now execute then attempting to connect in to the sql server.. i got the following error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error locating Server/Instance Specified.

Can you give some idea whats wrong with my connectionstring

im using ado.net and this is my connectionstring in my vb.net code:

Dim con As SqlConnection = New SqlConnection("Server=ITS-CODER02\DIBMART; Initial Catalog = HiKLotMgt; User Id= sa; Password = weee!@#;")


what is wrong with my connectionstring? everyone's help is greatly appreciated.. thanks

Is This A Good Question/Topic? 0
  • +

Replies To: provider: SQL Network Interfaces, error: 26 – Error locating Server

#2 Michael26  Icon User is offline

  • DIC-head, major DIC-head
  • member icon

Reputation: 355
  • View blog
  • Posts: 1,519
  • Joined: 08-April 09

Re: provider: SQL Network Interfaces, error: 26 – Error locating Server

Posted 03 September 2013 - 01:05 AM

Does the second computer sql server have name ITS-CODER02\DIBMART does it have database HiKLotMgt

The point is the second computer that has sql server probably has different name.

This post has been edited by Michael26: 03 September 2013 - 01:11 AM

Was This Post Helpful? 0
  • +
  • -

#3 dave_mark  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 15-March 13

Re: provider: SQL Network Interfaces, error: 26 – Error locating Server

Posted 03 September 2013 - 01:15 AM

The second computer dont have sql server...the program that executes in the second computer will connect into my sql server installed in my computer. only in my computer's sql server are the server available and that will be the database that the rest of the program will connect. ITS-CODER02\DIBMART is the instance name of my server here in my computer and the database name is HiKLotMgt.

This post has been edited by dave_mark: 03 September 2013 - 01:22 AM

Was This Post Helpful? 0
  • +
  • -

#4 Michael26  Icon User is offline

  • DIC-head, major DIC-head
  • member icon

Reputation: 355
  • View blog
  • Posts: 1,519
  • Joined: 08-April 09

Re: provider: SQL Network Interfaces, error: 26 – Error locating Server

Posted 03 September 2013 - 01:22 AM

So the program on second computer should connect to the first one that has ITS-CODER02\DIBMART and database HiKLotMgt?

You can check connection string here http://www.connectionstrings.com/
Was This Post Helpful? 0
  • +
  • -

#5 dave_mark  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 15-March 13

Re: provider: SQL Network Interfaces, error: 26 – Error locating Server

Posted 03 September 2013 - 01:25 AM

the program i installed in the second computer should connect to the sql server installed in my computer or the first computer...

I already been there in the connectionstring.com.. i try the connectionstring using ip address but still doesnt work..
is there someting configuration in my sql server 2008?

This post has been edited by dave_mark: 03 September 2013 - 01:26 AM

Was This Post Helpful? 0
  • +
  • -

#6 Michael26  Icon User is offline

  • DIC-head, major DIC-head
  • member icon

Reputation: 355
  • View blog
  • Posts: 1,519
  • Joined: 08-April 09

Re: provider: SQL Network Interfaces, error: 26 – Error locating Server

Posted 03 September 2013 - 01:50 AM

Did you enable remote connection
Was This Post Helpful? 0
  • +
  • -

#7 dave_mark  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 15-March 13

Re: provider: SQL Network Interfaces, error: 26 – Error locating Server

Posted 03 September 2013 - 06:47 PM

I already enable remote connection from the link you provide.. still got an error but fortunately i reinstall the server and enable remote connection it works fine... thanks a lot,,,
Was This Post Helpful? 0
  • +
  • -

#8 Michael26  Icon User is offline

  • DIC-head, major DIC-head
  • member icon

Reputation: 355
  • View blog
  • Posts: 1,519
  • Joined: 08-April 09

Re: provider: SQL Network Interfaces, error: 26 – Error locating Server

Posted 04 September 2013 - 11:24 AM

If you're working for a company i don't think they'll allow you to just re-install server for every error you get, just keep that in mind :)
Was This Post Helpful? 0
  • +
  • -

#9 dave_mark  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 15-March 13

Re: provider: SQL Network Interfaces, error: 26 – Error locating Server

Posted 04 September 2013 - 04:46 PM

yah i knew it.. this is the first time i install sql server in our company and also i just install it in my computer for exploration as well as making program to the company. i did not install sql server in our application because this is the first time i install sql server... thanks for the advise.. god bless
Was This Post Helpful? 0
  • +
  • -

#10 Wrath_014  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 49
  • Joined: 19-July 13

Re: provider: SQL Network Interfaces, error: 26 – Error locating Server

Posted 05 September 2013 - 01:24 AM

I have a similar problem, concerning error 26, but my DB is a local MDF file, next to the app itself...
Now, on my computer it works fine, after building it of course, but when I installed it on 2 different computers, I get this error. I've installed .net framework 4.5 on these computers, but still, no go.

My software is now on a run-up stage before I publish it, and this thing is very frustrating...

Thanks.
Was This Post Helpful? 0
  • +
  • -

#11 dave_mark  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 15-March 13

Re: provider: SQL Network Interfaces, error: 26 – Error locating Server

Posted 05 September 2013 - 04:43 PM

What is the exact error msg? what is your rdbms? if sql server, did you do remote connection as link provided above? is your application need framework 4.5? or maybe framework 4?
Was This Post Helpful? 0
  • +
  • -

#12 Wrath_014  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 49
  • Joined: 19-July 13

Re: provider: SQL Network Interfaces, error: 26 – Error locating Server

Posted 06 September 2013 - 05:06 AM

View Postdave_mark, on 05 September 2013 - 04:43 PM, said:

What is the exact error msg? what is your rdbms? if sql server, did you do remote connection as link provided above? is your application need framework 4.5? or maybe framework 4?

The DB is next to the app itself. (SQL Server 2012 Express, but I've created the DB from the VS 2010)

My app requires .net framework 4.0.

I get the same error as you, number 26.
Was This Post Helpful? 0
  • +
  • -

#13 Wrath_014  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 49
  • Joined: 19-July 13

Re: provider: SQL Network Interfaces, error: 26 – Error locating Server

Posted 07 September 2013 - 09:10 AM

    Dim connenctionstring As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\whmdf.mdf;Integrated Security=True;User Instance=True"


This is my connection string, it works on my computer but on others it doesn't. What seems to be the problem? Perhaps, the data source? Maybe it's because they don't have MS SQL?

Thanks.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1