Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tom knauf
  Where is tom knauf?
 
 Germany
 tom knauf
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: Def. ODBC data source FROM VFP Apps
Thread ID: 395943 Message ID: 396196 # Views: 32 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Win32API programming
Date: Thursday, January 23, 2014 1:23:01 PM         
   


> > Hi Stefan once more,
> >
> > As I verified user DSN can be define, but system not, regardles of the settings of UAC. Unfortunately SqlStringConnect(), at least on my work station, needs DSN too, so that is why I try to define programatically ODBC data source. This is important on a new work station where FVP apps has been installed.
> >
>
> And a "User DSN" would not work? The difference between "System" and "User" in this case should merely be that a "System" DSN cannot unintentionally get modified or deleted by a standard account unintentionally. It does not mean that a connection via "System DSN" would have different privileges
>
>
> > Is there a form of the connection string that SqlStringConnect() doesn't need DSN? I use standard formula:
> > cSqlConnectionStr = "driver = {SQL Server};server=;uid=;pwd=".
>
> These two attempts just worked for me from the Command Window of a VFP session running with default privileges on a Win7 64bit system in the local network here, no DSN required
>
>
> n0 = SQLStringConnect("DRIVER={SQL Server Native client 11.0};SERVER=serverName;UID=userName;PWD=somePwd;DATABASE=someDB")
> n1 = SQLStringConnect("DRIVER=SQL Server;SERVER=serverName;UID=userName;PWD=somePwd;DATABASE=someDB")
> 

>
>
>
>
> hth
> -Stefan

Hello

just to add :
or maybe trusted_connection=yes instead of pw/user if installed with nt auth only

regards
tom

ENTIRE THREAD

Def. ODBC data source FROM VFP Apps Posted by Jerzy Kopinski @ 1/21/2014 5:36:44 PM
RE: Def. ODBC data source FROM VFP Apps Posted by Stefan Wuebbe @ 1/21/2014 5:58:47 PM
RE: Def. ODBC data source FROM VFP Apps Posted by Jerzy Kopinski @ 1/22/2014 7:34:23 AM
RE: Def. ODBC data source FROM VFP Apps Posted by Stefan Wuebbe @ 1/22/2014 8:27:23 AM
RE: Def. ODBC data source FROM VFP Apps Posted by Jerzy Kopinski @ 1/22/2014 8:52:22 AM
RE: Def. ODBC data source FROM VFP Apps Posted by Jerzy Kopinski @ 1/22/2014 8:36:09 AM
RE: Def. ODBC data source FROM VFP Apps Posted by Stefan Wuebbe @ 1/22/2014 9:08:24 AM
RE: Def. ODBC data source FROM VFP Apps Posted by tom knauf @ 1/23/2014 1:23:01 PM