Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 sql Server

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-07-02 : 07:15:45
Deepa writes "how to retrieve data from tables of different databse using ado"

X002548
Not Just a Number

15586 Posts

Posted - 2003-07-02 : 10:25:53
Create a linked server and use stored procedures?

Why do the majority of questions seems to want to do dynamic sql?



Brett

8-)
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2003-07-02 : 10:48:03
quote:

Create a linked server and use stored procedures?

Why do the majority of questions seems to want to do dynamic sql?




They have probably inherited a database design that inspires it as the apparent low-maintainence solution to the immediate problems. Yah.

-------
Moo.
Go to Top of Page

monkeybite
Posting Yak Master

152 Posts

Posted - 2003-07-02 : 11:16:29
quote:
Why do the majority of questions seems to want to do dynamic sql?


I think one does what one knows and what works. People give up to easily when they can't get sprocs and/or SQL Server to work, so they revert back to old skool and do dynamic sql or MS Access.

Plus, it seems that every single example in every crappy book uses dynamic sql and executes it using the Connection.Execute method, unless they are demonstrating the Command object, then they use the SQL string there, too.

~ monkey



Edited by - monkeybite on 07/02/2003 11:18:20
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-07-02 : 11:41:20
Why use ADO for this? If the database is on the same server as your other database, then just code your T-SQL statements using the 3 part name: <database name>.<owner name>.<object name>. If it isn't on the same server, then use a linked server like Brett mentioned. All of this can be done in a stored procedure.

Tara
Go to Top of Page
   

- Advertisement -