Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with SQLConfigDataSource
Message
From
07/02/2000 09:41:51
 
 
To
07/02/2000 08:23:02
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00328194
Message ID:
00328230
Views:
18
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
Map
View

Click here to load this message in the networking platform