troubleshooting Question

how to use SQLDriverConnect

Avatar of turbot_yu
turbot_yuFlag for Singapore asked on
System Programming
29 Comments1 Solution1166 ViewsLast Modified:
How to define the parameters.

      SQLHENV    hEnv;
      SQLHDBC    hDbc;
      SQLHWND     hwnd;
      

    SQLSMALLINT      SQL_NTS;      
    SQLCHAR *     szOutConn;
    SQLSMALLINT     MAX_CONN_OUT;
    SQLSMALLINT *     cbOutConn;
    //SQLUSMALLINT     SQL_DRIVER_NOPROMPT;

      SQLinfo = SQLDriverConnect(
            hDbc,
            hwnd,
            (SQLTCHAR*)"FILEDSN=SQL_Server;Trusted_Connection=yes""FILEDSN=SQL_Server;Trusted_Connection=yes"
            SQL_NTS,
            szOutConn,
            MAX_CONN_OUT,
            &cbOutConn,
            SQL_DRIVER_NOPROMPT);

but has error
C:\Documents and Settings\yuming\Desktop\EventDTP 20 Feb 2006_ run online_June2006\eventDTP.cpp(676) : error C2064: term does not evaluate to a function
C:\Documents and Settings\yuming\Desktop\EventDTP 20 Feb 2006_ run online_June2006\eventDTP.cpp(680) : error C2660: 'SQLDriverConnect' : function does not take 7 parameters
Error executing cl.exe.
ASKER CERTIFIED SOLUTION
deepu chandran

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 29 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 29 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros