Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Network:
Windows 2003 Server
>>Hi,
>>
>>I use remote views to manage SQL Server data in my application. I discover something special when I investigate how remote views are interpreted in SQL Server :
>>
>>Sometimes the view is created as an "SELECT ..." preceded by "SET FMTONLY ON" and followed by "SET FMTONLY OFF", sometimes the view is created as an "sqlprepare" followed by the SELECT statement.
>>Could you explain that difference ?
>>
>>Moreover when I use "USE ... NODATA" to open a remote view, VFP have to generate (see VFP help) a where clause like "WHERE 1=2", it works well in most of my customers except one (In France). Could you explain that difference ?
>>
>>Thanks in advance for your help.
>>
>>Marc
>
>SET FMTONLY ON .. OFF gets the structure from SQL server w/o any data.
>SQLPrepare is used when the same call would be repeated with changing parameters (body compiled once and called many times).
>
>"Where 1=2" is to mean "Where FALSE". It is to get the structure only and works with other backend too (and in VFP too). It could do "set fmtonly on" but for historical reasons done with 1=2 I think. In France if that is not working than the problem should be different. This is the first time I hear it is not working.
>
>Cetin
Thanks Cetin for your answer, I understand all of explanations but I had knowledge of those behaviours. I just don't understand the difference between the two behaviours. Ths big problem is the unworking in France ...
I have to wait for other suggestions.
Marc
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement