General information
Category:
Windows API functions
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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only