473,320 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Calling Sql Server 2000 from C# Express

If I use a Sql Server 2005 Express copy of a database on my local
machine to develop my apps, can I then just substitute (Ctl+Shift + H
"replace all") the server name of my local machine with the server name
of our company server when I deploy this to my users?

I can't deploy versions calling my local development machine because
other apps talking to this same database are still based on VS 2003 and
some even from VB6, and they all need to talk to the same Sql Server.

Has anyone tried this? Yes, I'm going to try it myself, just loking for
input from fellow users. I want to get started in the VS 2005 world but
I'm not ready to buy the Professional version yet, want to see what I
can learn and do with Express version for a bit.

Thanx, Bob

Feb 2 '06 #1
3 1274
RvGrah,

Instead of hard coding your connection string, why not get that value
from a config file for your app? You should be able to do something like
this in your config file:

<connectionStrings>
<add name="MyLocalSQLServer"
connectionString="Initial Catalog=aspnetdb;
data source=localhost;Integrated Security=SSPI;"
providerName="System.Data.SqlClient"/>
</connectionStrings>

And then, in your code, you should be able to do:

// Get the connection string.
string connectionString =
System.Configuration.ConfigurationManager.Connecti onStrings["MyLocalSQLServer"];

Then, all you have to do is change the value in the config file, and you
don't have to worry about re-compiling your app anytime you want to specify
a different server.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"RvGrah" <rv****************@sbcglobal.net> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
If I use a Sql Server 2005 Express copy of a database on my local
machine to develop my apps, can I then just substitute (Ctl+Shift + H
"replace all") the server name of my local machine with the server name
of our company server when I deploy this to my users?

I can't deploy versions calling my local development machine because
other apps talking to this same database are still based on VS 2003 and
some even from VB6, and they all need to talk to the same Sql Server.

Has anyone tried this? Yes, I'm going to try it myself, just loking for
input from fellow users. I want to get started in the VS 2005 world but
I'm not ready to buy the Professional version yet, want to see what I
can learn and do with Express version for a bit.

Thanx, Bob

Feb 2 '06 #2
Thanks Nicholas, Ill try that.
I almost addressed the question directly to you, as I was pretty sure
you'd be the one to answer it.

Bob

Feb 2 '06 #3
I'm flattered, thank you!
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"RvGrah" <rv****************@sbcglobal.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Thanks Nicholas, Ill try that.
I almost addressed the question directly to you, as I was pretty sure
you'd be the one to answer it.

Bob

Feb 2 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

48
by: ik | last post by:
ERROR after uninstalling SQL Server 2005 Express I get this message, SQLDMO has not been registered. Please re-run your setupand contact your system administrator. GREAT!!! ReInstalled SQL...
5
by: RDV | last post by:
I have 2 SQL Server Express questions: 1) Can you manage a SQL Server Express installation from the regular SQL Server Enterprise Manager? I am getting a message that says "SQL Server does not...
10
by: amjad | last post by:
how to connection sql server table with aspx like pulling data from table to grid view.... simple example to start .... thanks
1
by: theintrepidfox | last post by:
Dear Group. Wondered if any of you has any suggestion for the following? Trying to install SQL Server 2005 Eval on a 'clean' machine. Well, my mistake was probably that I had installed Visual...
14
by: Developer | last post by:
Hello All, i have recently installed VS2005 and was trying to install SQL sever 2000. I have Win XP' SP2. But when I tried installing, it only installed client tools and not the database. Can...
12
by: Light | last post by:
Hi all, I posted this question in the sqlserver.newusers group but I am not getting any response there so I am going to try it on the fine folks here:). I inherited some legacy ASP codes in my...
3
by: Steve | last post by:
Hi All I downloaded Sql server 2005 express SP2 and attempted to modify the Bootstrapper package files as I did with SP1 When i try to install SQL server as part of my VS 2005 deployment app I...
6
by: Grey Alien | last post by:
I have an ASP.Net website that was developed using SQL Server 2000. I want to 'port' it to use SQL Server Express, since I don't have SQL Server 2000 (besides my db is less than 1GB). Questions:...
10
by: Scott M. | last post by:
I've seen many posts and ready articles discussing how changing the membership & roles "provider" in VS .NET is easy, but have yet to see instructions on how to do it. If I already have SQL...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.