bernardmanning
Programmer
Hi,
I've got a pretty strange problem using SQL Server 7.0 sp4 along with Foxpro 6.0
I have a foxpro remote view that includes an index hint, eg ;
If I cut and paste this statement into SQL 2000, it uses the hint and you can see it in the estimated execution plan.
If I do the same in SQL 7.0 , it runs ko, but I recieve a warning telling me that it isn't going to use the hint.
Now the problem comes when I send this statement via a remote view from foxpro to SQL 7.0
I receive a error '1526 Connectivity error: FORM. ODBC Error: 8118' when I try to use the view, which is indicating that the column 'SomeidField' is invalid as it's not an arregate function and is not in the group by list, which of course it is.
When I run SQL profiler against this remote view to see what is being sent to SQL server 7.0 I see this kind of thing ;
As you can see the group by has gone and the where clause has changed.
Does anybody know what's going on?
I've tried this with the latest service packs for fox, sql and the latest version of mdac to ensure the odbc drivers are up to date.
The weird thing is if I run this remote view against a sql server 2000 database set to 7.0 compatibility it works fine!!!
Many thanks in advance. Bernard
I've got a pretty strange problem using SQL Server 7.0 sp4 along with Foxpro 6.0
I have a foxpro remote view that includes an index hint, eg ;
Code:
Select sum(something),SomeidField from table1
inner join table2 (INDEX (MyReqdIndex)) on table1.field1 = table2.field2 where someIdField = 43 group by SomeIDField.
If I cut and paste this statement into SQL 2000, it uses the hint and you can see it in the estimated execution plan.
If I do the same in SQL 7.0 , it runs ko, but I recieve a warning telling me that it isn't going to use the hint.
Now the problem comes when I send this statement via a remote view from foxpro to SQL 7.0
I receive a error '1526 Connectivity error: FORM. ODBC Error: 8118' when I try to use the view, which is indicating that the column 'SomeidField' is invalid as it's not an arregate function and is not in the group by list, which of course it is.
When I run SQL profiler against this remote view to see what is being sent to SQL server 7.0 I see this kind of thing ;
Code:
Select sum(something),SomeidField from table1
inner join table2 on table1.field1 = table2.field2 where 1 = 0
As you can see the group by has gone and the where clause has changed.
Does anybody know what's going on?
I've tried this with the latest service packs for fox, sql and the latest version of mdac to ensure the odbc drivers are up to date.
The weird thing is if I run this remote view against a sql server 2000 database set to 7.0 compatibility it works fine!!!
Many thanks in advance. Bernard