| | |
during the deployment, faced a problem :P..
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2009
Posts: 40
Reputation:
Solved Threads: 0
Hi ppl,
Now this is very funny,
luk, my company is a small 1, i just completed a project, this is connected to backend (MS SQL). since itis small, my company canot keep a server for the client alone.
now, how can i deploy.
I tld my MD tat the client can make its own computer as a server n hence use it. this can happen.
but, if the client needs to have a server, he/she shud install the sql server. if it is installed there, then the connection string would obviously change, right.......
so now wat i need to knw is, after the client installs the server, the data source wud have changed, how could i get that assembly info, i mean the data source ( the server name) n then put it into my deployed project.
is there anything which does it automatically,
here, i wud give the client just the server cd as well as the setup file, but not the vs code.
is there anything called data source = "Assembly Info" (some thing similar) so tat it takes the name frm the comp itself directly....
plz help me, i have been braking my head for the past week in to this...
Now this is very funny,
luk, my company is a small 1, i just completed a project, this is connected to backend (MS SQL). since itis small, my company canot keep a server for the client alone.
now, how can i deploy.
I tld my MD tat the client can make its own computer as a server n hence use it. this can happen.
but, if the client needs to have a server, he/she shud install the sql server. if it is installed there, then the connection string would obviously change, right.......
so now wat i need to knw is, after the client installs the server, the data source wud have changed, how could i get that assembly info, i mean the data source ( the server name) n then put it into my deployed project.
is there anything which does it automatically,
here, i wud give the client just the server cd as well as the setup file, but not the vs code.
is there anything called data source = "Assembly Info" (some thing similar) so tat it takes the name frm the comp itself directly....
plz help me, i have been braking my head for the past week in to this...
•
•
Join Date: Oct 2008
Posts: 103
Reputation:
Solved Threads: 14
You can use "localhost", but I would make it a "configurable" option. What if they decide to move the database to another computer? Place all user configurable options in a file (text or binary)--in essence make your own ".ini" file. Then read the values from file either when the program is loaded or before trying to connect to the database. Obviously you also need to build an interface that will allow the user to update/change the necessary information. If I it was me, I would make it so that it is easy to add support for different databases. See http://www.connectionstrings.com for connection string info for other databases. Also if you don't really have concurrent transactions occurring you may consider using SQL Server Compact edition providing you meet the requirements of their "Terms and Conditions"--it is a free download from the Microsoft website.
Last edited by cgeier; Jul 25th, 2009 at 8:37 pm.
Hi,
use configuration file to store connection string. then read connection string whenever required. this way it will allow to change it whenever you required, even after deploying the project.
use configuration file to store connection string. then read connection string whenever required. this way it will allow to change it whenever you required, even after deploying the project.
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Indian Developer
http://falaque.wordpress.com/
•
•
Join Date: Jul 2009
Posts: 40
Reputation:
Solved Threads: 0
C# Syntax (Toggle Plain Text)
Hi, I tried using the below as it was said, "Data Source = localhost; Initial Catalog = arun; Integrated Security = True";
the error tat was said was:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
i have a doubt regarding this, shud i put the datasource as
localhost or
Localhost or
Local Host or
'localhost' or
"localhost".
plz do help me with this regard...
•
•
Join Date: Jul 2009
Posts: 40
Reputation:
Solved Threads: 0
•
•
•
•
I'm not getting it.
You want to build a connectionstring for a sql db on the client host.
in this case just use 'localhost' as data source.
C# Syntax (Toggle Plain Text)
Hi, I tried using the below as it was said, "Data Source = localhost; Initial Catalog = arun; Integrated Security = True";
the error tat was said was:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
i have a doubt regarding this, shud i put the datasource as
localhost or
Localhost or
Local Host or
'localhost' or
"localhost".
plz do help me with this regard...
•
•
Join Date: Jul 2009
Posts: 40
Reputation:
Solved Threads: 0
•
•
•
•
I think in the connection string if you give like this it will work:
DataSource = .
Since .(DOT) refers to the current system.
C# Syntax (Toggle Plain Text)
so am i supposed to write it as Data Source = .; Initial Catalog = arun; Integrated Security = True;"
could u plz gimme the complete connection string tat i can i use, wrt the example given by me....
plz do reply...
•
•
Join Date: Jun 2009
Posts: 67
Reputation:
Solved Threads: 0
•
•
•
•
C# Syntax (Toggle Plain Text)
so am i supposed to write it as Data Source = .; Initial Catalog = arun; Integrated Security = True;"
could u plz gimme the complete connection string tat i can i use, wrt the example given by me....
plz do reply...
connectionString="Data Source=.;Initial Catalog=Library;Integrated Security=True"
I think this should help you out. Because . here refers to the current system.
![]() |
Similar Threads
- Netbeans installation problem (Java)
- Problem with Pinnacle PCTV-Stereo (PCI and Add-In Cards)
- hello i have a problem (VB.NET)
- Windows Visa Home Basic Major Problem (Windows Vista and Windows 7)
- Datagrid Problem!!!!!!! (VB.NET)
- audio problem (Windows NT / 2000 / XP)
- Search problem (Java)
- Problem with jsp include directive in iPlanet. Working in Tomcat. (JSP)
- booting problem (Windows NT / 2000 / XP)
Other Threads in the C# Forum
- Previous Thread: Updating,deleting,Adding in access using c# in datagridview after using paging in it
- Next Thread: Access to member
| Thread Tools | Search this Thread |
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# chat check checkbox client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file files form format forms function gdi+ httpwebrequest image index input install java label list listbox listener mandelbrot math mouseclick mysql nargalax networking object operator path photoshop picturebox pixelinversion polynomial post prime programming radians regex remote remoting richtextbox save saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml





