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

Thursday, March 29, 2012

Convert a SQLExpress File based DB Project to SQLExpress Server DB Project

Hi All,

I've been struggling with this for hours...

Could someone please advise me on how to convert my current File based SQL Server Express website to a Server based SQL Express one.

Particularly interested in what I need to do in the SQL Express management tool, changes I need to make the projecvt itself and changes needed to get IIS to understand things have been changed.

Thanks,

Martin.

Hi Martin, you can try these steps:

1. Detach the database file from your project: open the project with VS2005->right click the mdf file in Solution Explorer->choose detach

2. Attach the database into SQL: open Management Studio->right click Databases in Object Explorer-> choose Attach.

3. change your connection string: remove AttachDBFileName property; modify the database property to point to the new attached database.

For more information, you can refer tohttp://msdn2.microsoft.com/en-us/library/ms187858.aspx

Convert a sql express to mysql

Hello.

I have created a web site using visual web developer (free download) The website was created using asp.net 2.0. The vwd I have incorporated the cool new roles and membership features of asp.net 2.0. When i did this vwd automatically created a sql express database (aspnetdb.mdf) to hold the login stuff.

I then purchased som e web hosting from a company and found out that they only support MySQL databases.

My questions are;

1. Can anyone tell me the difference between the two types of database (i know what sql express is but am not sure what MySQL is)

2. Secondly, is there a tool or way I can convert the SQL Express database to a MySQL database?

TIA

ICW

MySQL is a rather poor database that lots of people use illegally because they think it's free. If the web hosting company is charging you for hosting, they are using MySQL commercially and either paying for it or breaking the law.

Odds are that the SQL Server database is using stored procs, if this is so, then possibly not. If it's just using tables and dynamic queries, then probably.

|||

Thanks

The SQL Express database does indeed have several stored procs "aspnet_membership...". are you saying that MySQL cannot do stored procedures?

Regards

ICW

|||Hi there,

Yes, MySQL does have stored procedures. It didn't use to (pre version 5.0) but it does now. Please see this link for a write-up: http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html

If the hosting company you have chosen is using anything before MySQL 5.0 then stored procedures are out of the question. Also, if the stored procedures are using T-SQL specific constructs then you may have to find their equivalents (if they exist) in MySQL. For example, if you use X() in SQL Server the equivalent may be Y() in MySQL and so when you code your MySQL stored procedure you use Y().

However, if your stored procedures are doing something fancy then chances are you won't find a MySQL equivalent (although MySQL is faithful to all the standard SQL constructs for the most part so if you only use standard SQL then there's a chance there that you can migrate (reasonably) painlessly).

I have never had the experience of doing a SQL Server --> MySQL conversion, but here is a page that may help you:
http://dev.mysql.com/tech-resources/articles/migrating-from-microsoft.html

A quick browse shows it references a few tools that you might use and also has links to forums and other places where people (like MySQL experts) could offer some good advice.

Sorry I can't be of more help at the mo.
|||

Thanks for your help

regards

ICW

|||

Hi everyone

I too have been struggling to deploy the ASPNETDB database on alternative platforms. From many hours of reading MS documentation it seems that the only answer is to create your own Membership and Role providers that conform to the published API of ASP.NET This means writing a lot of code but it can be done. You also have to tell your application to use your version rather than the default one by altering the settings in the web.config file.

It seems that Microsoft left the door open for this and publish guidance to that effect. It's not a question of converting the tables etc, you can't do it! Its a matter of providing an interface between the objects built-in to the Framework class library and your own database engine and data files.

Now the real question is has anyone out there done this for MySql? Is there a software company selling addons to support it?

Regards

Phil Hall

Convert a sql express to mysql

Hello.

I have created a web site using visual web developer (free download) The website was created using asp.net 2.0. The vwd I have incorporated the cool new roles and membership features of asp.net 2.0. When i did this vwd automatically created a sql express database (aspnetdb.mdf) to hold the login stuff.

I then purchased som e web hosting from a company and found out that they only support MySQL databases.

My questions are;

1. Can anyone tell me the difference between the two types of database (i know what sql express is but am not sure what MySQL is)

2. Secondly, is there a tool or way I can convert the SQL Express database to a MySQL database?

TIA

ICW

MySQL is a rather poor database that lots of people use illegally because they think it's free. If the web hosting company is charging you for hosting, they are using MySQL commercially and either paying for it or breaking the law.

Odds are that the SQL Server database is using stored procs, if this is so, then possibly not. If it's just using tables and dynamic queries, then probably.

|||

Thanks

The SQL Express database does indeed have several stored procs "aspnet_membership...". are you saying that MySQL cannot do stored procedures?

Regards

ICW

|||Hi there,

Yes, MySQL does have stored procedures. It didn't use to (pre version 5.0) but it does now. Please see this link for a write-up: http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html

If the hosting company you have chosen is using anything before MySQL 5.0 then stored procedures are out of the question. Also, if the stored procedures are using T-SQL specific constructs then you may have to find their equivalents (if they exist) in MySQL. For example, if you use X() in SQL Server the equivalent may be Y() in MySQL and so when you code your MySQL stored procedure you use Y().

However, if your stored procedures are doing something fancy then chances are you won't find a MySQL equivalent (although MySQL is faithful to all the standard SQL constructs for the most part so if you only use standard SQL then there's a chance there that you can migrate (reasonably) painlessly).

I have never had the experience of doing a SQL Server --> MySQL conversion, but here is a page that may help you:
http://dev.mysql.com/tech-resources/articles/migrating-from-microsoft.html

A quick browse shows it references a few tools that you might use and also has links to forums and other places where people (like MySQL experts) could offer some good advice.

Sorry I can't be of more help at the mo.
|||

Thanks for your help

regards

ICW

|||

Hi everyone

I too have been struggling to deploy the ASPNETDB database on alternative platforms. From many hours of reading MS documentation it seems that the only answer is to create your own Membership and Role providers that conform to the published API of ASP.NET This means writing a lot of code but it can be done. You also have to tell your application to use your version rather than the default one by altering the settings in the web.config file.

It seems that Microsoft left the door open for this and publish guidance to that effect. It's not a question of converting the tables etc, you can't do it! Its a matter of providing an interface between the objects built-in to the Framework class library and your own database engine and data files.

Now the real question is has anyone out there done this for MySql? Is there a software company selling addons to support it?

Regards

Phil Hall

Thursday, March 8, 2012

Continuously updating a website

Hi,

Bit of a newbee question:

I'm after hosting a website with basically a table in it that is linked to a MS SQL Server 2005 database, which I want to update on a pretty much continual basis from my own server PC which I'm running a data mining tool that updates the MS SQL Server 2005 database.

Any idea on how I would achieve this, or any pointers would be much appreciated.

Cheers,

Tom

One of the better options would be to explore Replication.

Other than that, you could use the Windows Scheduler to run on a predetermined schedule, executing SQLCmd.exe, which could execute a script file or a stored procedure.