Showing posts with label website. Show all posts
Showing posts with label website. Show all posts

Monday, March 26, 2012

How to Connect to my Web-SiteSqlServer through Enterprise Manager?

Hi all,

I have Sql Server 2000 installed in my home and also i have a website that works with Sql Server2000 and .Net FrameWork v1.1 ,now i want to know is it possible to connect from
my home SqlServer to Host SqlServer( where my Website resides ) through Enterprise manager or Query Analizer to do some data-manipulation And how?

Thanks in advance.
Regards.

You have to ask for Enterprise Manager access from the hosting company if not they will not offer it. Then you can use the backup and restore wizard to move your databases between servers. Hope this helps.

Friday, March 23, 2012

how to connect from visual studio to a ms sql 2005 database on a server

Hello,

I have visual studio 2005 installed on my PC. I want to create a new website and I want the site to be connected to a MS SQL 2005 database that resides on my hosting account. I am thinking this can be done but I have watched videos, spent time looking for a site to help and I have hit a brick wall.

I have no idea how to do this.

Can anyone please help me with some instructions or a webpage that shows you how to do this.

Thank You

Joe

Hello,

I have found the solution and would like to share it with anyone that needs this info.

I have found you can connect to a ms sql 2005 database that resides on your hosting account either by
using the Visual Web Developer Express Edition which is free or Microsoft Visual Studio.

The first thing you need is asp 2.0 hosting account and a ms sql 2005 database activated on your hosting account.

The below will work for both versions of software mentioned above.

1. OPen your desired software program and Create a New Website

2. In the database explorer right mouse click on Data Connections and add a new connection.

Datasource = Microsoft SQL Server (SQL Client)

Server Name = This should of been supplied by your hosting provider eg sql26565.aspprovider.net

Select - Use SQL Authorisation

User Name = your username for your database (this should be provider by your provider)

Password = your password for the database (this should be provider by your provider)

Select the database from within the connect to database tab

Click ok and the database should be connected and appears under the Data Connections Folder.

If you need to know how to add grids etc there are lots of very handy videos which with what you learn will work on both versions of teh software programs mentioned here.

I Hope this helps anyone that had faced the same issue that I have. So many learning videos out there but an important step that has been missed due to the focus on the express editions.

Thanks

Joe

|||If you need to know how to add grids etc pls visit which applies to both versions of the
software mentioned. --> http://msdn.microsoft.com/vstudio/express/vwd/learning/default.aspx

Monday, March 19, 2012

How to configure SQL 2000

Hi, I got a website and everything works fine with SQL Server 2000, but now I modified the way of authentication using Forms and when I enter in a protected area I got this error:

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)

The problem is that I don′t have SQL Server 2005 installed so I don′t know why my webapp is trying to contact it, where I can configure this settings so it will look for the Server that exists?

Thanks.

Hi,

Try checking your web.config file to look for any SQL Server 2005 Express edition related info. Are you using Membership provider or Web Administration Tool?

Vivek

|||

Hi, I found this sitehttp://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx.

It resolved my problem, but now I′m facing another problem, but I guess it′s not related with the data base anymore.

Thanks.

how to configure multiple databases for one asp.net website

Hello:
I am working on a website that will require the use of multiple
databases - a unique database for each user in fact. It is somewhat of
a light CRM application and it is important to keep a user's customer
information in their own database.
So I am hoping to get input on the best way to implement this. The
approach I am using so far includes storing the database connection
string in a property of the user's profile object. However, this
requires referencing the profile object each time I hit the database.
And for pages that are using the sqldatasource control, that means
assigning the connectionstring property for that control in the
page_load event outside of an "if not page.ispostback" block. So I
wonder if there isn't a better way.
Any feedback would be really appreciated here.
ChrisHow about storing the user's database name in their profile object and/or in
a session variable. Then you can prefix all of your calls with the database
name:
... "EXEC " + session("database_name") + ".dbo.ProcedureName";
Of course, if you are doing this for scalability reasons, you will probably
want to consider multiple connection strings for different servers...
<chrishalldba@.yahoo.com> wrote in message
news:1138581470.361914.172540@.o13g2000cwo.googlegroups.com...
> Hello:
> I am working on a website that will require the use of multiple
> databases - a unique database for each user in fact. It is somewhat of
> a light CRM application and it is important to keep a user's customer
> information in their own database.
> So I am hoping to get input on the best way to implement this. The
> approach I am using so far includes storing the database connection
> string in a property of the user's profile object. However, this
> requires referencing the profile object each time I hit the database.
> And for pages that are using the sqldatasource control, that means
> assigning the connectionstring property for that control in the
> page_load event outside of an "if not page.ispostback" block. So I
> wonder if there isn't a better way.
> Any feedback would be really appreciated here.
> Chris
>|||How about storing the user's database name in their profile object and/or in
a session variable. Then you can prefix all of your calls with the database
name:
... "EXEC " + session("database_name") + ".dbo.ProcedureName";
Of course, if you are doing this for scalability reasons, you will probably
want to consider multiple connection strings for different servers...
<chrishalldba@.yahoo.com> wrote in message
news:1138581470.361914.172540@.o13g2000cwo.googlegroups.com...
> Hello:
> I am working on a website that will require the use of multiple
> databases - a unique database for each user in fact. It is somewhat of
> a light CRM application and it is important to keep a user's customer
> information in their own database.
> So I am hoping to get input on the best way to implement this. The
> approach I am using so far includes storing the database connection
> string in a property of the user's profile object. However, this
> requires referencing the profile object each time I hit the database.
> And for pages that are using the sqldatasource control, that means
> assigning the connectionstring property for that control in the
> page_load event outside of an "if not page.ispostback" block. So I
> wonder if there isn't a better way.
> Any feedback would be really appreciated here.
> Chris
>|||Aaron:
Thanks for your reply. I actually left out some stuff in my post to
keep the thread somewhat open-ended. Your suggestion actually looks
very close to what I ended up implementing. I am storing a database
connection string in a profile object, then loading that into a session
variable when the user logs in. It sounds like I'm on the right track
so that's reassuring. Thanks for the peace of mind!
Chris

Monday, March 12, 2012

How to configure connection string for remote server?

Sorry for the newbie question, but...

I have developed a website on my local development machine. When I create the connections string VS automatically creates a path to my local hard drive inside the string.

Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Documents and Settings\Mike\My Documents\Visual Studio 2005\WebSites\PostAlertz\App_Data\PADatabase.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True

However, when I deploy this website to a remote server, SQLExpress tries to attach to the file using the wrong path. How do I fix this?

Your patience is appreciated...Smile

Hi

Here is a sample connection string,and you can find more onhttp://www.connectionstrings.com/:

Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

HOW-TO: Database from VWD to Shared Host tells you how to copy database to share host.

Hope this helps.

|||If you have SQL Express instance installed on the remote server, just set the correct path for the mdf file like:

data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|PADatabase.mdf;User Instance=true