|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
<<< Connection Problem with SQL Server + C#.Net on Local Area Network >>>i m new on Sql and i have a project related to C# and Sql. i have to do a project which must work on LAN, and there must be only one database file on main computer(Server Computer) and other computers(client computers) must connect database on main computer. i m preparing my project on my personal computer(it is called MYCOMP) and doing connection with wizard. then it doesnt work on other computers(works only my personal computer). when i done connection with wizard .Net create a connection code like below.... // sqlConnection1 // this.sqlConnection1.ConnectionString = "workstation id=MYCOMP;packet size=4096;integrated security=SSPI;data source=MYCOM" + "P;persist security info=False;initial catalog=migros"; i think, because of taking my computer's name in connection string it doesnt work on other computers... what can i do for this problem :(((((((( please write me a solution as soon as possible...( i have only 15 days to hand over and still couldnt start to write my codes, otherwise i cant graduate....) PLEASE HEEEEEEEEEEEEEEEELP !!!!!!! thnks for now...... based on following assumption, you need onlt to replace your computer name
with the other computer's name: 1. The SQL Server is installed on the other computer; 2. There is a database called "migros" attached to that SQL Server; 3. The SQL Server on the other computer is allowed for network access; 4. There are logins on the QL Server set up properly that allow user to log in with Windows Security. or a simple one assumption: the SQL Server on the other computer was set up PROPERLY. So, your connectionString will look like: this.sqlConnection1.ConnectionString = "workstation id=TheOtherComputer;packet size=4096;integrated security=SSPI;data source=TheOtherComputer[\InstanceName]" + ";persist security info=False;initial catalog=migros"; <gndz***@gmail.com> wrote in message Show quote news:1144091525.688395.121470@i39g2000cwa.googlegroups.com... > hi all, > > i m new on Sql and i have a project related to C# and Sql. > > i have to do a project which must work on LAN, and there must be only > one database file on main computer(Server Computer) and other > computers(client computers) must connect database on main computer. > > i m preparing my project on my personal computer(it is called MYCOMP) > and doing connection with wizard. then it doesnt work on other > computers(works only my personal computer). when i done connection with > wizard .Net create a connection code like below.... > > // sqlConnection1 > // > this.sqlConnection1.ConnectionString = "workstation id=MYCOMP;packet > size=4096;integrated security=SSPI;data source=MYCOM" + > "P;persist security info=False;initial catalog=migros"; > > > i think, because of taking my computer's name in connection string it > doesnt work on other computers... > > what can i do for this problem :(((((((( > > please write me a solution as soon as possible...( i have only 15 days > to hand over and still couldnt start to write my codes, otherwise i > cant graduate....) > > PLEASE HEEEEEEEEEEEEEEEELP !!!!!!! > > thnks for now...... > |
|||||||||||||||||||||||