Information générale
Catégorie:
Fonctions Windows API
Thanks Rob. !
I try it and the DSN was create correctly with one of the SQL Server.
BUT It's strange, it doesn't execute correctly with other SQL Server in .exe mode.
I think that I will use the DSN LESS connection with SQLSTRINGCONNECT.
Stef
>Hi Stéphane,
>
>>DECLARE integer SQLConfigDataSource in odbccp32.dll Integer, Integer, String, String
>
>Your DECLARE statement should be like this:
>
>DECLARE Integer SQLConfigDataSource IN odbccp32.dll Integer, Integer, String @lc_string, String @lc_string
>
>>= SQLConfigDataSource(0,3,'SQL Server',lcSettings) && Delete DSN
>
>Then your API call should be like this:
>
>lc_driver = "SQL Server"
>
>=SQLConfigDataSource(0, 3, @lc_driver, @lcSettings)
>
>You need the '@' to tell FoxPro to pass the strings by reference, not value. The API function is expecting by reference.
>
>That should clear up your problem.
>
>Good luck.
>
>Rob.
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