SQLStringConnect without login dialog on error in VFP

Posted on 2008-11-17
Last Modified: 2012-05-05
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;
Question by:carmas123
    LVL 17

    Expert Comment

    I am not familiar with "the sql standard dialog box". Is this a FoxPro dialog? Please post a screen shot of it.


    Author Comment

    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.
    LVL 17

    Expert Comment

    Please post a screen shot of it.
    LVL 29

    Accepted Solution

    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


    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
    Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.
    Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now