Fox 7 , ODBC , SQL Server, connection problems with sqlexec() 
Author Message
 Fox 7 , ODBC , SQL Server, connection problems with sqlexec()

Hi dont know if any one has come across this problem but its giving me a
headache.

Fox front end connects to SQL server 7 backend database via ODBC, this has
been fine for views , sqlexec querys etc and works a treat. The problem that
has arisen only affects two machines of approx 30. The problem being that
these two machines will not wait for sqlexec to return results, simply does
not wait thus the fox app errors as the data isnt available to work with.
This is fine on many other machines of same OS setup etc.

I have played with the connection properties Asynchronous true \ false

do while sqlexec(blah blah)=0
enddo

but these two machines still will not wait for sqlexec, I see no difference
between all the machines that do work and the two that dont thus am a little
stumped.
Any ideas anyone

Many thanks
Dave



Mon, 05 Sep 2005 21:53:10 GMT  
 Fox 7 , ODBC , SQL Server, connection problems with sqlexec()
Hallo Dave,

SQLExec has as return value . If it lower 0 it is the Error Code. Use Aerror
to get the Error Number.
This will be your friend

Greetings Alexander



Mon, 05 Sep 2005 22:34:53 GMT  
 Fox 7 , ODBC , SQL Server, connection problems with sqlexec()
Are you sure the statement is still executing and VFP doesn't wait? Can you
confirm that this is the case, using the Profiler?
If this is true, is indeed a very weird behavior. One place too look at
could be the MS SQL ODBC driver version and the ODBC manager version on the
two machines.

HTHT,
Remus


Quote:
> Hi dont know if any one has come across this problem but its giving me a
> headache.

> Fox front end connects to SQL server 7 backend database via ODBC, this has
> been fine for views , sqlexec querys etc and works a treat. The problem
that
> has arisen only affects two machines of approx 30. The problem being that
> these two machines will not wait for sqlexec to return results, simply
does
> not wait thus the fox app errors as the data isnt available to work with.
> This is fine on many other machines of same OS setup etc.

> I have played with the connection properties Asynchronous true \ false

> do while sqlexec(blah blah)=0
> enddo

> but these two machines still will not wait for sqlexec, I see no
difference
> between all the machines that do work and the two that dont thus am a
little
> stumped.
> Any ideas anyone

> Many thanks
> Dave



Tue, 06 Sep 2005 04:51:16 GMT  
 Fox 7 , ODBC , SQL Server, connection problems with sqlexec()
Have you verified the Asynchronous property via SQLGETPROP()?

Mike



Wed, 07 Sep 2005 13:18:47 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. SQL Server Connection Problem using SQL Pass-Through

2. SQL Server 7 ODBC Connection

3. ODBC, sqlexec(..'insert-sql'), and general fields

4. Problem: ODBC - SQL Server From Win'98

5. Problems with ODBC AND SQL - Server

6. FPW2.6/WFW3.11/NT4.0/SQL Server - ODBC Problem

7. SQL Server ODBC driver problem

8. VFP 3.0 remote view, ODBC, SQL server 6.5 problem

9. Visual Fox Pro to SQL Server 6.5 Upsizing problem

10. Running SQL against ODBC View (SQL Server)

11. FOX SQL Standard vs SQL Server Standard

12. 16 Bit ODBC connection to SQL 7.0

 

 
Powered by phpBB® Forum Software