.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

How to import existing database into Webmatrix?

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net
 

I am planning to use Webmatrix as a testing arena for creating and completing the preparation of a website before publishing it. Working with websites on local computer should be much faster than doing that on an online server.

That is why I downloaded a database that I have already created on my online host account, and wanted to import it into webmatrix to continue building my new website using Webmatrix. Here, I did not know how to imort the DB I downloaded from my host, into webmatrix. There is seemingly no way to do that, or to import tables into an existing DB on webmatrix. 

Is that not possible? 

2- I tried to create a new DB on webmatrix which is a part of installing Wordbress on WM (new site from web gallery --> Wordpress), but I get this error :

The database 'xxxx' could not be created. ---> MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:3306


I have installed PHP 5.2 and Mysql on Webmatrix. 


Why does this happen?




View Complete Post


More Related Resource Links

How to import existing database into Webmatrix?

  

I am planning to use Webmatrix as a testing arena for creating and completing the preparation of a website before publishing it. Working with websites on local computer should be much faster than doing that on an online server.

That is why I downloaded a database that I have already created on my online host account, and wanted to import it into webmatrix to continue building my new website using Webmatrix. Here, I did not know how to imort the DB I downloaded from my host, into webmatrix. There is seemingly no way to do that, or to import tables into an existing DB on webmatrix. 

Is that not possible? 

2- I tried to create a new DB on webmatrix which is a part of installing Wordbress on WM (new site from web gallery --> Wordpress), but I get this error :

The database 'xxxx' could not be created. ---> MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:3306


I have installed PHP 5.2 and Mysql on Webmatrix. 


Why does this happen?


Connecting to MS SQL Server database using webmatrix.

  

Hi,

I am novice  user to raizor syntax using webmatrix and i am trying to connect MS Sql server database (instead of using .sdf file i am using .mdf file) using the tool webmatrix for startersite.

The connection string that i setup as follows.

<?xml version="1.0"?>

<configuration>

    <system.web>
        <compilation debug="false" targetFramework="4.0" />
    </system.web>
    <connectionStrings>
    <add name="OESConnectionString" connectionString="Data Source=.\SQLServer2005;AttachDbFilename=|DataDirectory|\OES_Data.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
    </connectionStrings>

</configuration>

And i am using websecurity helper as well and the setup is as follows.

WebSecurity.InitializeDatabaseConnection("Data Source=INLTE5556\\SQLServer2005;Initial Catalog=OES;Integrated Security=True", "System.Data.SqlClient", "UserProfile", "UserId", "Email", true);

When i am trying to insert the user details into database i am getting the below error.

Format of t

xml import to database

  

Hello. I have XML document I use for backups..

I am using this code for importing XML to database:

protected void uvoziPodatkeXML(string backup, int tabela, string destinacijaTabela)
        {
            DataSet reportData = new DataSet();

            FileStream filestream = File.OpenRead(lblPotIzvozi.Text + txtIme.Text + backup);
            BufferedStream buffered = new BufferedStream(filestream);
            reportData.ReadXml(buffered);

            //reportData.ReadXml(lblPotIzvozi.Text + txtIme.Text + backup);



            SqlConnection povezava = new SqlConnection(Convert.ToString(Session["cs"]));
            SqlBulkCopy sbc = new SqlBulkCopy(Convert.ToString(Session["cs"]), SqlBulkCopyOptions.KeepIdentity);
            povezava.Open();
            sbc.DestinationTableName = destinacijaTabela;
            sbc.WriteToServer(reportData.Tables[tabela]);
            sbc.Close();

            povezava.Close();
        }


But there is a problem when XML file is very large, larger than 50MB, it lasts forever to import to database.. I was searching over google, and saw that datasets are terrible slow for this operation.. I found some other methodes for use, but don't know there are no examples, that could help me.

Did someone work on this before?

thanks, yevgeni

XML Schemas: Take Advantage of Existing External XML Schemas with a Custom Import Framework in ASP.N

  

Over the years, many industry-standard XML schemas and dialects have been developed. These industry-specific schemas embrace the original purpose of XML and are extremely valuable in promoting and supporting B2B interaction. Unfortunately, the ASP.NET Web Services runtime does not allow developers to directly reference external schemas from within their XML Web Services interface (the WSDL file). This article builds an external schema framework as an extension to the ASP.NET Web Services runtime to enable you to reference external schemas within your XML Web Service interface.

Scott Short

MSDN Magazine December 2002


Connect to existing sql 2005 database

  

Hello There,


I had successfully restored sql 2000 database to sql 2005. It works like charm


Now i am creating a database model in MVC


I follow these steps

Right click on model > ADO.NET entity data model > Generate from database > New connection (Microsoft sql server) > server name > select or enter database name


But no server name AND database name show in both drop down lists. When i mannually enter database name (which exists in sql 2005) then click on TEST CONNECTION. It gives follwoing error

"A network-related or instance-specific error while establishing a connection to sql server. the server was not found or was not accessible. verify that the instance name is correct and that sql server is configured to allow remote connections.


Kindly help me with this


Regards


"The backup set holds a backup of a database other than existing database. Restore Database is term

  
I have a problem when i restore my .DAT_BAK file.  I am getting error like "The backup set holds a backup of a database other than existing database.  Restore Database is terminating abnormally".   I tried by using   RESTORE DATABASE <DATABASENAME> FROM DISK = 'D:\DATA\MYTEST.DAT_BAK' WITH MOVE 'VZAI_DATA' TO D:\PROGRAM FILES\..\MSSQL\TEST.MDF', MOVE 'VZAI_LOG' TO D:\PROGRAM FILES\..\MSSQL\TEST.LDF', REPLACE   And also i tried like   RESTORE DATABASE <DATABASENAME> FROM DISK = 'D:\DATA\MYTEST.DAT_BAK' WITH REPLACE   When i use like this,   RESTORE FILELISTONLY FROM DISK = 'D:\DATA\MYTEST.DAT_BAK'. I am able to get the output as LogicalName, PhysicalName, Type, FileGroupName, Size, etc.   Can i anyone please help me out?   Thanks in Advance, Anand Rajagopal

how to import a database from sql 2008 r2 to sql 2008 ( from 10.50.1600 to 10.0.2531.0)

  
Hi I wolud like to import a database from sql 2008 r2 to sql 2008. I have got an error: This version is incompatible with that server. Microsoft SQL Server Management Studio      10.0.2531.0 Microsoft Analysis Services-Clienttools      10.0.1600.22 Microsoft Data Access Components (MDAC)      6.1.7600.16385 Microsoft MSXML      3.0 6.0 Microsoft Internet Explorer      8.0.7600.16385 Microsoft .NET Framework      2.0.50727.4927 Betriebssystem      6.1.7600 Thanks in advance Sebatian

import a database from sql 2008 r2 to sql 2008.

  
Hi I wolud like to import a database from sql 2008 r2 to sql 2008. I have got an error: This version is incompatible with that server. Microsoft SQL Server Management Studio      10.0.2531.0 Microsoft Analysis Services-Clienttools      10.0.1600.22 Microsoft Data Access Components (MDAC)      6.1.7600.16385 Microsoft MSXML      3.0 6.0 Microsoft Internet Explorer      8.0.7600.16385 Microsoft .NET Framework      2.0.50727.4927 Betriebssystem      6.1.7600 Thanks in advance Sebatian

Unable to see Active Directory Groups in the User Profile Database after Profile Import

  
SharePoint Server 2010 Enterprise RTM. W2K8R2 w/multi-server setup: AD/DNS SQL 2008 WFE APP Claims Mode Web App only using Windows Integrated Auth So, this was never a problem in 2007, and I didn't even realize it was a problem in 2010 until I started to build a solution that utilized my blog article: InfoPath - User Roles in Browser-Enabled Forms Using AD Groups.  I went to utilize the same web method of the same web service, but I noticed that no data was showing up at all.  Typically, the GetUserMembership/GetCommonMembership methods return the specified user's memberships: AD Security Groups, AD Distribution Lists, and SharePoint Sites (not SharePoint Groups, though). My user profile sync is working.  All AD users are pulled in with the proper profile data. "Users and Groups" is selected in the Synchronization Entities section of my Sync Settings. Security groups are working for permissions and audience targeting.  Confirmed my users are affected properly by the use of Security Groups. My query to the GetUserMemberships web method (and GetCommonMemberships) is running (not failing), but it's not returning anything even though my user is in some Security Groups and has explicit membership to multiple sites. The GetUserProfileByName method of the same UserProfileService.asmx web service returns all the regular profile data

How to add existing SourceSafe database to SSMS project

  

I have a several large Visual Sourcesafe (VSS) databases with scripts of all objects of several SQL server databases. They were integrated into VSS using Visual Studio. But the Solution file in VSS can not be opened from SQL Server Management Studio 2008 (SSMS). (Its a .sln file, and I need a .ssmssln file). If I try I get an error saying that the solution file was created with a newer version ...

My question is : How do I create a new SSMS project and connect it to one of the existing VSS databases to make it possible to view/check in/check out all the procedures, functions, tables etc. already stored in VSS from within SSMS.


Error while Deploying WebMatrix Beta Application having SQL Database on Remote Server

  

Hello All,


I have created "DotNetNuke SQL Database Application" from the WebMatrix Gallery.

Now I want to deploy it on the remote server using Web Deploy method.

Without selecting SQL database, application is deployed successfully but when I select SQL database it gives following error:

Publish : Error - Make sure the database connection string for the server is correct and that you have appropriate permission to access the database. (Web Deploy provider is dbFullSql).

Can anyone have the solution of this error?

Thanks in advance....



Error 3154: The backup set holds a backup of a database other than the existing 'xx' database.

  

HELP!

This is happening with a restore to SS 2005 from a SS2000 backup. This article says to use the 'WITH REPLACE' clause. The SS2005 management studio does not seem to allow this via the GUI.

http://msdn2.microsoft.com/en-us/library/aa238217(sql.80).aspx

 

 


A little bug with WebMatrix Sql ce Database , WebSecurity and Roles ?

  

Hi , i'm reviewing heavily the api provided with webpages which is really cool , it reminds me the api zend provides for php.

But i add some issues with WebSecurity and the Roles object.

I think you should not be able to insert multiple times the same role to the same user with the Roles.AddUserToRole(user, role) command cause it makes the database editor bug big time. I could not edit the webpages_UsersInRoles table manually anymore because of identical rows in the Data editor. i had to do a SQL DELETE to be able to edit the table again. So maybe there should be some kind of check if the association exists before inserting another user/role relationship.

I wasn't able to use some methods of simpleroleprovider either. Is it fully implemented?

Anyway , i cant wait for the official stable release.

Regards


is it possible to import data into a replicated database

  

I have a 2005 database set up Ok for Merge replicataion and I need to add data from an Acess 97 database I have been using the wizard to import the tables to new tables then I have a script which appends the tables sometimes making small changes this is fine if the database is not replicable but will not work if it is.  I do need to keep all identiy fields
Some of these tables only have a couple of rows and their 'range' seems to be within the values in the table properties

I get error
The insert failed. It conflicted with an identity range check constraint in database 'My_MPC', replicated table 'dbo.TblLiqItems', column 'LiqId'. If the identity column is automatically managed by replication, update the range as follows: for the Publisher, execute sp_adjustpublisheridentityrange; for the Subscriber, run the Distribution Agent or the Merge Agent.


jnc

Adding Current Windows User to Database Encounters Existing User with Same Login

  

In VS2008 in debug mode, I am using SMO to programatically change the users and permissions on a database. Windows authentication alone is being used. I need to limit access to a administrators group and the current user for whom the database has been dynamically created during the first run of the application within their current Windows environment on the machine. I have no problems creating and assigning the administrators group, but when I try to create the user using the environment's UserDomainName and UserName variables (which would be my creditals) I encounter an inner exception "The login already has an account under a different user name". Before doing running the app, I manually have checked the local server for user and logins with my credentials and programatically looked at each login but have not found any matching credentials. 

Insights and suggestions appreciated.

Marc


creating profile using an existing database raither than default database of ASPNETDB.MDF

  

Alternatively, you could create your own custom Profile provider that operates against existing database tables .

Please, i want u to help me out if u have an idea where i can get steps by steps to carry out the above operation.

i know there are various options in creating profile , particularlly the use of web. configuration, the default ASPNETDB,  and XML files, BUT i wish to use an existing database which i prefer.


import text to database

  

Hi,

I have a text file that looks like this:
Chapter 1
Line 1: some text here some text here
Line 2: some text here some text here
Line 3: some text here some text here

Chapter 2
Line 1: some text here some text here
Line 2: some text here some text here
Line 3: some text here some text here

I want to import this into a database so that the table will look something like this:
Chapter, Line, Text
1,1,some text here some text here
1,2,some text here some text here
1,3,some text here some text here
2,1,some text here some text here
2,2,some text here some text here
I guess I need to wrote some custom C#/VB code to get this done, is this correct or can I use SSIS with / without the custome code.

TIA

eddiec :-)


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend