• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2146
  • Last Modified:

SQLStringConnect without login dialog on error in VFP

Hi, want to try a connect to my DB with command SQLStringConnect but i don't want to show the sql standard dialog box
when an error encured. I can do this?

My string connection is like this:
DRIVER={SQL Native Client};DATABASE=myDatabase;SERVER=myPC\SQL2008,3433;Trusted_Connection=yes;
  • 2
1 Solution
ramromconsultant Commented:
I am not familiar with "the sql standard dialog box". Is this a FoxPro dialog? Please post a screen shot of it.

carmas123Author Commented:
When you try to connect to an external DB (like SQL Server 2005) with the function SQLStringConnect()
and the connection fails VFP show a dialog with SQL connection parameter.
I would like that this dialog box don't show.
ramromconsultant Commented:
Please post a screen shot of it.
Olaf DoschkeSoftware DeveloperCommented:
You can use SQLSetProp even without first making a connection for some general settings. Use 0 as Connectionhandle. Now if  login failed via SQL(String)Connect() you'll need to use AERROR() to find out why.
#include foxpro.h

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now