[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ConnectionString for another PC

Posted on 2007-10-19
6
Medium Priority
?
186 Views
Last Modified: 2010-03-19
Hi
I've got application that works fine on development PC.  Its server name is \PC144\SQLExpress.  The ConnectionString is programmed in it seems to the application config / XSD file by visual studio automatically.

The server name on target pc could be anything e.g. PC192\SQLExpress.

What does one do to cater for this?  I thought if the Database NAME in both systems were same it would be OK ???

Thanks
0
Comment
Question by:rwallacej
6 Comments
 
LVL 12

Expert Comment

by:patrikt
ID: 20107784
Do you received some error?
If your connection string is in configuration file just change server name and if needed database name and it is ready.

Patrik
0
 
LVL 18

Accepted Solution

by:
Sham Haque earned 1200 total points
ID: 20107785
if you are always referencing a LOCAL server, use .

eg
.\SQLExpress

assuming instance name is always the same

0
 
LVL 5

Assisted Solution

by:bullrout
bullrout earned 400 total points
ID: 20107800
HI There,

When you add a database connection to visual studio the connection string is created for you. You are probably using incorrect credentials.Check this url it gives you all of the connection strings that you could ever imagine.

Sean

http://www.connectionstrings.com/
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 

Author Comment

by:rwallacej
ID: 20107809
patrikt - there doesn't seem to be a config file in the build, only .exe, .pdb etc

gbshahag - I'll try this
0
 
LVL 12

Assisted Solution

by:patrikt
patrikt earned 400 total points
ID: 20107928
OK, you probably used hadcoded string in your Connection object.
You can simply edit ConnectionString proerty before first connection open. It is up to you where you store actual server name.
Your program has to supply working connection string before first connection open.
0
 

Author Comment

by:rwallacej
ID: 20115887
gbshahag :
\SQLExpress
works, thank-you

patrikt :
I have awarded points for your contribution too


thanks
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question