Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
dir sir,
we connect two machin in lan success, in ssms connect database success but my programme
(vb.net) not connect lan network server only connect local server please give setting
SQL
in my setting file :
[DATABASE : YEARS]
SERVER=ram\Sqlexpress
user=sa
password= 123abc
trust= no
CONNECTIONSTRING=Persist Security Info=False;Integrated

Security=SSPI;Connect Timeout=36425;Initial Catalog=;server=ram
\Sqlexpress
AUTOATTACH=NO
database source= main
DATABASE=MAIN

we work on my dell-pc and my database in my ram pc when we run programe get this error
login failed for user 'ram\guest' system data.sqlclient.sqlerrorcollection -2146232060
can not connect to sql server application will now quit
Posted
Updated 25-Oct-12 21:26pm
v3

1 solution

We can't give you the connection string - we have no idea how your systems are configured.
Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.
 
Share this answer
 

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