Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote view TOP n with n as a param
Message
De
18/11/2013 11:18:20
 
 
À
18/11/2013 10:58:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01588219
Message ID:
01588268
Vues:
41
Hank - thank you SO much. All my VFP is pre 64bit and this would have eluded me forever. Did not even know there was a 32 / 64 bit distinction on ODBC. Worked instantly.

>If your DSN is a 32-bit System DSN, what you wrote should work. (On an x64 system, that means going to the SysWow64 directory, and running odbcad32.exe to create it).
>
>Hank
>
>>>Charles, I tend to doubt this will help - so consider this a "Hail Mary" attempt....but it's the only thing I can think of.
>>>
>>>In SQL Server, this doesn't work...
>>>
>>>
>>>declare @RowsToGet int
>>>set @RowsToGet = 10
>>>select top @RowsToGet  * from SomeTable
>>>
>>>However, this does (requires parenthesis around the parameter variable for SQL to evaluate it)
>>>
>>>
>>>declare @RowsToGet int
>>>set @RowsToGet = 10
>>>select top (@RowsToGet)  * from SomeTable
>>
>>Thank you! I think that is exactly what I am looking for. i have found VFP params in remote views work pretty much the same as variables in TSQL when they are translated into SPT so I suspect parens around the ? param will make it work.
>>
>>But to test in real SPT rather than waiting until I finish the remote views DBC, I need to establish a connection in VFP from the command window .,..
>>
>>Could you refresh my memory on getting a connection in VFP to a system or file dsn from the comman window?
>>
>>I have a system dsn ITF that uses a trusted connection (perhaps VFP is not seen as such?)
>>
>>nConnectionHandle = SQLCONNECT('ITF') gets a -1
>>I created a file DSN and put in in my VFP path ITFDSN but nConnectionHandle = SQLCONNECT('ITFDSN') gets a -1 as well
>>
>>Am I doing something boneheaded or does this stuff not allow trusted connection or ...
>>
>>TIA


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform