during the deployment, faced a problem :P..

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2009
Posts: 40
Reputation: arunkumars is an unknown quantity at this point 
Solved Threads: 0
arunkumars arunkumars is offline Offline
Light Poster

during the deployment, faced a problem :P..

 
0
  #1
Jul 25th, 2009
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...
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 24
Reputation: lqdo is an unknown quantity at this point 
Solved Threads: 0
lqdo's Avatar
lqdo lqdo is offline Offline
Newbie Poster

Re: during the deployment, faced a problem :P..

 
0
  #2
Jul 25th, 2009
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++ it!
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 103
Reputation: cgeier is an unknown quantity at this point 
Solved Threads: 14
cgeier cgeier is offline Offline
Junior Poster

Re: during the deployment, faced a problem :P..

 
0
  #3
Jul 25th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 483
Reputation: DangerDev has a spectacular aura about DangerDev has a spectacular aura about 
Solved Threads: 58
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Pro in Training

Re: during the deployment, faced a problem :P..

 
0
  #4
Jul 26th, 2009
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.
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 40
Reputation: arunkumars is an unknown quantity at this point 
Solved Threads: 0
arunkumars arunkumars is offline Offline
Light Poster

Re: during the deployment, faced a problem :P..

 
0
  #5
Jul 26th, 2009
Thanks a lot to lqdo,cgeier,DangerDev..
that was a valid piece of info, wil try both the ways possible,
wil get back to u abt this...
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 40
Reputation: arunkumars is an unknown quantity at this point 
Solved Threads: 0
arunkumars arunkumars is offline Offline
Light Poster

Re: during the deployment, faced a problem :P..

 
0
  #6
Jul 29th, 2009
  1. Hi,
  2. I tried using the below as it was said,
  3. "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...
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 40
Reputation: arunkumars is an unknown quantity at this point 
Solved Threads: 0
arunkumars arunkumars is offline Offline
Light Poster

Re: during the deployment, faced a problem :P..

 
0
  #7
Jul 29th, 2009
Originally Posted by lqdo View Post
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.

  1. Hi,
  2. I tried using the below as it was said,
  3. "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...
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 67
Reputation: S2009 is an unknown quantity at this point 
Solved Threads: 0
S2009 S2009 is offline Offline
Junior Poster in Training

Re: during the deployment, faced a problem :P..

 
0
  #8
Jul 29th, 2009
I think in the connection string if you give like this it will work:

DataSource = .

Since .(DOT) refers to the current system.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 40
Reputation: arunkumars is an unknown quantity at this point 
Solved Threads: 0
arunkumars arunkumars is offline Offline
Light Poster

Re: during the deployment, faced a problem :P..

 
0
  #9
Jul 29th, 2009
Originally Posted by S2009 View Post
I think in the connection string if you give like this it will work:

DataSource = .

Since .(DOT) refers to the current system.

  1. so am i supposed to write it as Data Source = .; Initial Catalog = arun; Integrated Security = True;"
  2.  

could u plz gimme the complete connection string tat i can i use, wrt the example given by me....
plz do reply...
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 67
Reputation: S2009 is an unknown quantity at this point 
Solved Threads: 0
S2009 S2009 is offline Offline
Junior Poster in Training

Re: during the deployment, faced a problem :P..

 
0
  #10
Jul 29th, 2009
Originally Posted by arunkumars View Post
  1. so am i supposed to write it as Data Source = .; Initial Catalog = arun; Integrated Security = True;"
  2.  

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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC