G
Guest
Hi,
I need to use the SqlCommand object to execute a query that copies records
from one MSSQL Database to another. I'm not using stored procedures, I'm
setting the CommandText property of the command in code.
The SQL is pretty simple. Given two databases A and B, both of which have
an identical file File1, the SQL is...
INSERT INTO A.File1 SELECT * FROM B.File1 WHERE <Some Condition>
I create and open two SQLConnection objects, one to Database A and one to B.
When the command is executed, the error I get says that A.File1 is not
recognized.
Can this be done? If so, how?
Thanks.
BBM
I need to use the SqlCommand object to execute a query that copies records
from one MSSQL Database to another. I'm not using stored procedures, I'm
setting the CommandText property of the command in code.
The SQL is pretty simple. Given two databases A and B, both of which have
an identical file File1, the SQL is...
INSERT INTO A.File1 SELECT * FROM B.File1 WHERE <Some Condition>
I create and open two SQLConnection objects, one to Database A and one to B.
When the command is executed, the error I get says that A.File1 is not
recognized.
Can this be done? If so, how?
Thanks.
BBM