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 10:58:37
 
 
À
18/11/2013 10:16:22
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:
01588257
Vues:
66
This message has been marked as the solution to the initial question of the thread.
J'aime (1)
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform