Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Sir,
I need help on vb.net application and backend sql server 2005 database.
My problem is when i run my application on server system its runs OK, but when i install
it in another system which was connected via crossover lan cable with server system
it will not open and sql network related error occurs.
Here is my code for connection with sql database:-

VB
Public Server As String
Public Function DBset() As String
        Server = System.IO.File.ReadAllText(Application.StartupPath & "\PMS.ini")
        Return "Data Source=" & Server & ";Initial Catalog=GPMS;User    ID=sa;Password=jay@321;Integrated Security=false"
    End Function


Can any body help me on this issue.
Posted
Updated 1-Aug-15 22:55pm
v2
Comments
Kornfeld Eliyahu Peter 2-Aug-15 4:40am    
What error did you have there?
Afzaal Ahmad Zeeshan 2-Aug-15 5:03am    
The problem would be that you are missing most of the required assemblies or the framework. Please make sure all of the required binaries are also transmitted to the client machine.
DamithSL 2-Aug-15 5:34am    
what is the full error with stack trace which you get?

1 solution

Make sure that your SQL Server instance is accessible from the client machine. If not, make sure your database engine is configured to accept remote connections.
To do that
a. Go to Start - All Programs - SQL Server 2005 - Configuration Tools - SQL Server Surface Area Configuration
b. Click on Surface Area Configuration for Services and Connections
c. Select your SQL Server instance.
d. Go to Database Engine - Remote Connections
e. Enable local and remote connections
f. Restart

Hope, it helps :)
 
Share this answer
 
Comments
hspl 2-Aug-15 7:21am    
I do the process you mentioned by selecting remote connections>>enabled local and
remote connections checked radio button>>then checked using TCP/IP only.
but still not works......

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900