[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2065
  • 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;
0
carmas123
Asked:
carmas123
  • 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.

0
 
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.
0
 
ramromconsultant Commented:
Please post a screen shot of it.
0
 
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
SQLSetProp(0,"DispLogin",DB_PROMPTNEVER)
SQLSetProp(0,"DispWarnings",.F.)

Open in new window

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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