Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hello everyone,
 
I am working on a project using VS2010 SQL2008 and I saw an ODD behaviour ,
First let me tell you that the app runs without any problem in my developing pc (Windows Xp sp3 32bit)
 
But when I was trying the application in another pc (Windows 7 32bit)
 
I got this exception:
 
A network-related or instance-specific error occured while establishing a connection to SQL server.The server was not found or was not accessible.Verfiy that the instance name is correct and that SQl server is configured to allow remote connections.
 
Now what is weird in this exception; Is when the application reaches the DataAdpater.Fill(dataset) line I got this exception but when
the app reaches the DataAdpter.Insert(....) It runs without any problem .
 
And what is more weird is that I noticed that the dataset that is used in the previous insert procedure can later be filled with dataAdapter.Fill(...) procedure which it was giving me an exception .
 

Now I hope you understand my problem
 
I tried these things as a solution:
 
1)Checked SQlBrowser running..
2)No aliases to Sql server at all to remove...
3)remote area connection--OK
4)TCP and UDP port 1433,1434 exception in firewall
5)Unistalled my only antivirus Norton
6)Added Tcp/IP ports in Sql protocols
7)My connection String is : onnectionString="Data Source=ALI\SQLEXPRESS;Initial Catalog=PALMSDATABASE;Integrated Security=True"
8)Also tried using Sql Server authentication (user Id and password)
 

My question is what is the difference between fill and insert?
Is there a problem with my connection?
My app. runs smoothly on the original pc ,What should I do?
Please If anyone knows anything help me, I am very desperate.
Posted 22-Aug-11 15:42pm
Edited 22-Aug-11 16:09pm
v2
Comments
walterhevedeich at 22-Aug-11 22:11pm
   
What's the data type of DataAdpter? I assume its not SqlDataAdapter since that class has no Insert method.
Abhishek Pant at 19-Dec-12 3:24am
   
http://www.codeproject.com/Questions/500077/sqlplusserverplus2005plusinstallation-2fconnection
 
try solution 1 and also check sql server in your services.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Here more reasons so try those too. Here you go
SQL Server 2005 Connectivity Issue Troubleshoot[^]
  Permalink  
Comments
walterhevedeich at 23-Aug-11 0:35am
   
Good links. I believe it is what OP really need.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

HI,
 

 
GO START -> ALL PROGRAMS -> SQL SERVER 2008/2005/2008 R2
->CONFIGURATION TOOLS->
->SELECT SQL SERVER CONFIGURATION MANAGER
->SELECT SQL SERVER NETWORK CONFIGURATION
->SELECT PROTOCOLS FOR MSSQLSERVER(YOUR INSTANT NAME)
->IN RIGHT TASK PANEL
->MAKE SURE MENTION BELOW:
 
DISABLE SHARED MEMORY AND VIA
ENABLE NAMED PIPE AND TCP/IP
 
—-MAKE SAME THING IN
->SQL NATIVE CLIENT 10.0(SERVER VERSION) CONFIGURATION – CLIENT PROTOCOLS
 
RESTART SQL SERVER(MSSQLSERVER [YOUR INSTANT NAME]) SERVICE
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

asddsa
asd
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 CPallini 550
1 Sergey Alexandrovich Kryukov 420
2 George Jonsson 288
3 Pheonyx 218
4 OriginalGriff 200
0 OriginalGriff 4,813
1 CPallini 3,850
2 Sergey Alexandrovich Kryukov 3,224
3 George Jonsson 2,552
4 Gihan Liyanage 2,186


Advertise | Privacy | Mobile
Web03 | 2.8.140905.1 | Last Updated 6 May 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100