Alaska Software Inc. - ODBC-SQL Server. Error while reading a file
Username: Password:
AuthorTopic: ODBC-SQL Server. Error while reading a file
Angel LafuenteODBC-SQL Server. Error while reading a file
on Fri, 16 Apr 2021 10:15:05 +0200
Hello,

I need to query some tables from a SQL Server. I think I am making the 
connections correctly, but I always get the same error.

Xbase version: 2.00.1400


   DbeLoad( "ODBCDBE" )
   DbeSetDefault( "ODBCDBE" )

   cConnect := "DBE=ODBCDBE;"+;
               "DRIVER=SQL Server;"+;
               "SERVER=213.22.44.212;"+;
               "DATABASE=crampi2020;"+;
               "UID=usuario;"+;
               "PWD=clave"

   oSQL := DacSession():new( cConnect )

   DbUseArea( .T., oSQL, "dbo.centres", "centres", .F., .T. )

   centres->(DbGoTop())
   DO WHILE !centres->(Eof())

      ? centres->cod             Works fine
      ? centres->direc             Error: genCode 73, Error while 
reading a file

      centres->(dbskip())

   ENDDO


TIA