In VB6 I have a designer report that needs to call some
t-sql code to populate the report. The issue is that the t-sql code creates a recordset that pulls from 2 tables that are in separate databases each with their own security. I can run the code from the query analyzer and it returns the correct recordset, but no matter how I try to run the query in VB code it returns an error that there is insufficient rights to access the database data. I even created 2 separate connections in code for each db but it still doesn't like it. I tried putting the t-sql in a stored procedure..doesn't work. I can't think of anything else...any other ideas out there?
t-sql code to populate the report. The issue is that the t-sql code creates a recordset that pulls from 2 tables that are in separate databases each with their own security. I can run the code from the query analyzer and it returns the correct recordset, but no matter how I try to run the query in VB code it returns an error that there is insufficient rights to access the database data. I even created 2 separate connections in code for each db but it still doesn't like it. I tried putting the t-sql in a stored procedure..doesn't work. I can't think of anything else...any other ideas out there?