Re: Manuel for ODBC by Anders
Anders
Wed Jun 23 06:14:40 CDT 2004
>> If security is an issue, this might
> be a reason to use a DSN.
On the contrary. With a connectionstring you can have the user enter the
password just in time and its' not stored anywhere.
-Anders
"Carsten Bonde" <bonde AT real-inkasso DOT de> wrote in message
news:eQH6zfQWEHA.3420@TK2MSFTNGP12.phx.gbl...
> Hoe,
>
> i'm not aware of any functional differences.
> The way you use DSN-Less connections is in code a little different.
> lnHandle= SQLConnect("DSN-Name")
> instead of
> SQLStringConnect(ConnectionString)
>
> In my previous example the connectionsstring is created on the fly. In
that
> case the program must know the password. If security is an issue, this
might
> be a reason to use a DSN.
> Maybe DSN's are easier to use when you have a DBC (with remoteviews) or
> CursorAdaptors. I have less expierence with that one.
>
> Instead of setting up the connectionstring, you can use the API-Function
> CreateDSN.
> Goes like this:
>
> <snip>
> PROCEDURE CreateDsn
> LOCAL settings
>
> DECLARE Integer SQLConfigDataSource in odbccp32.dll Integer, Integer,
> String, String
>
> settings="DSN=TestMySQL"+chr(0)+;
> "Description=MySQL DSN"+chr(0)+;
> "DATABASE=test"+chr(0)+;
> "SERVER=192.168.100.254"+chr(0)+;
> "UID=username"+chr(0)+;
> "PASSWORD=secret"
>
> Note: OS <= Win98, use the old driver "MySQL", on other systems
> Note: use the current driver: "MySQL ODBC 3.51 Driver"
> IF OS(3) >= "5"
> =SQLConfigDataSource(0,1,"MySQL ODBC 3.51 Driver",settings)
> ELSE
> =SQLConfigDataSource(0,1,"MySQL",settings)
> ENDIF
>
> <snip>
>
>
> Cheers
> Carsten
>
>
> "tnhoe" <tnhoe@pc.jaring.my> schrieb im Newsbeitrag
> news:cbbcf2$alc$1@news4.jaring.my...
> > "Carsten Bonde"
> >
> > What is the different of ODBC DSN and DSN less connection on VFP/MySQL ?
> >
> > Regards
> > Hoe
> >
> >
>
>