Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Deploying ODBC connection

Deploying ODBC connection

Deploying ODBC connection

Hi all,

I have a VFP client database that's full of remote views to an SQL Server database.

For simplicity there's a connection (user & password) to a named instance of SQL.

I know to make sure whatever ODBC driver is installed on clients.

But how does one actually deploy 'the existing' connection on clients, please?

Any advice, best practice much appreciated.

Thank you


RE: Deploying ODBC connection

You've got two options.

First option, create a File DSN:

1. Open the ODBC applet as usual.

2. Go to the File DSN tab.

3. Click Add and go through the steps.

4. You will be prompted for a file name. Choose a file and location for saving the DSN file.

5. On completion, you will have all the DSN settings saved in that file (it will have the extension DSN). You can distribute the file to your users.

Second option: Within VFP, use SQLSTRINGCONNECT() to connect to the driver. You pass it a string containing the relevant ODBC parameters. In this case, you don't need to distribute anything to the users (assuming they have the correct driver installed, of course).


Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Deploying ODBC connection

By the way, the DSN file is an ordinary text file which contains the same parameters that you would pass to SQLSTRINGCONNECT(). So another option would be to create the DSN file, then use that text to create the string that you pass to SQLSTRINGCONNECT(), after which you can discard the file.


Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Deploying ODBC connection

That's great Mike

I'll have a play with that cheers



Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close