Showing posts with label mdf. Show all posts
Showing posts with label mdf. Show all posts

Thursday, March 29, 2012

consolidate two data files

How can I combine two data files (i.e .mdf and .ndf). We had two data file in our old server due to disk limitation. In the new server we don't have such limitation so we like to consolidate the two file in one. What is the best way to accomplish that?
ThanksFollow this:
http://groups.google.com.au/group/microsoft.public.sqlserver.server/browse_thread/thread/d7fa8af9c5ca5ca/71636c29fdf2666c%2371636c29fdf2666csqlsql

Sunday, March 11, 2012

connection to SQL Server files (*.mdf) require SQL server express 2005 to function properl

I dont have the SQL EXPRESS installed instead I have SQL Standard Edition.

I have two SQL Server instances installed.

1- UserLT (this is sql 2000)
2- UserLT\SQL2005 (this is SQL 2005 named instance)

But when i try to add a database to my VS website project I get the following error:

Connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=4925

I went in Tools>Opetions>DataBase tools>Data Connection>Sql Server Instance Name (blank for default)

and changed the "SQLEXPRESS" to "USERLT\SQL2005".

But I still get the same error message. Any ideas how i can resolve this issue?

Hello,

Attach the files to your SQL server instance using for example the SQL management Studio and change your connectionstring to connect into this database.

|||

Well the thing is that I dont have a database created yet. I am trying to create a new database. If i create a database in SQL 2005 then my connectionstring will point to the database on sql server. I need the database to reside in the VS project like a stand alone .mdf file so that I can deply the database with my project.

Does that make sense? Thanks for your help.

|||

Hi,

You may open your Machine.Config file (the file is in %SystemRoot%\Microsoft.NET\Framework\ver. number\CONFIG ). Try to find the ConnectionString node, modify the setting and make it look like

<add name="LocalSqlServer" connectionString="data source=UserLT\SQL2005;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />

Thanks.

Connection to sql server files

I was trying to add a database
as a new item in solution explorer

But i am getting an error like this

Connection to sql server files (*.mdf)require SQL server 2005 to function properly.Please veryfy the instaltion of the component

what minght be the reason for this?

I have installed SQL server 2005 well and, controls like Datagrid view works fine in some other trials

Hope some one can help me

(NB:I have installed .net and sql server in diffrent partitions of my hard disk)

.net sujith

sujithukvl@.gmail.com:

I was trying to add a database
as a new item in solution explorer

But i am getting an error like this

Connection to sql server files (*.mdf)require SQL server 2005 to function properly.Please veryfy the instaltion of the component

what minght be the reason for this?

I have installed SQL server 2005 well and, controls like Datagrid view works fine in some other trials

Hope some one can help me

(NB:I have installed .net and sql server in diffrent partitions of my hard disk)

.net sujith

Why no one takes care of me :(

|||

It will be better to create your database programmatically like in the links below. Hope this helps.

http://support.microsoft.com/default.aspx?scid=kb;en-us;305079

http://www.functionx.com/csharp/adonet/Lesson04.htm

Tuesday, February 14, 2012

Connection String

Can VWD generate it by itself? I have a MDF file and I need to get the connection string.

What do you mean by generate it by itself?

|||

Ok, forget generating itself, how do I make the connection string for a mdf?

|||

Hi,

Form your description, it seems that you want to generate your connection string which links to a mdf file, right?

As for the "automatic way", do you mean an easy way to build the connection string? If so, you can use the connection builder to help you on creating the connection string. There are many ways to open the connection builder. i.e. Drag a SqlDataSource onto the webform, and configure the datasource, and click on "New Connection", and then you can select the server name, attach the database file, after that, click Ok, a new connection string would be added into Web.Config.

Thanks.