Showing posts with label solution. Show all posts
Showing posts with label solution. Show all posts

Sunday, March 25, 2012

Connenting to a another SQL Server using Transact-SQL

Hi,

I am finding a solution for how to connect to a SQL server by using Transact-SQL.

Suppose that there are two SQL Servers Call 'A' and 'B'.I just want to connect to the SQL Server 'B' from SQL Server 'A' to Insert data.

How can i do this only using Transact-SQL without using any programming language.

Thanks,

You will have to setup Server B as a linked server on Server A first. Then you will ba able to use frou part notation to access the Server:

Select * from SomeLinkedServerName.DatabaseName.OwnerOrSchema.Objectname

See the linked server topic in the BOL for more information.

Jens K. Suessmeyer.

http://www.sqlserver2005.de

Sunday, March 11, 2012

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