Re: Manuel for ODBC

From: Anders Altberg (x_pragma_at_telia.com)
Date: 06/23/04


Date: Wed, 23 Jun 2004 13:14:40 +0200


>> 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
> >
> >
>
>



Relevant Pages

  • Re: Configuration - DSN
    ... in der der gewünschte ConnectionString steht: ... >> mit diesem DSN will ich eine SQLConnection erstellen mit new ... Prev by Date: ... Next by Date: ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: Oracle Tabelle in Access MDB verknüpfen
    ... je nach aigerichtetem DSN musst du den String aufbauen. ... erzeugten ConnectionString für die spätere Verwendung auslesen. ... Erstelle die Verbindung mit der Access-Oberfläche und lies den erzeugten ...
    (microsoft.public.de.vb.datenbank)
  • Re: best way for storing connectionstring
    ... if you don't need all that security I recommend you storing it in ... > my application use a connectionstring to a database. ...
    (microsoft.public.dotnet.languages.vb)
  • Open Tab delimited file with ADO
    ... did anyone manage to opne a tab delimited file with ado? ... I managed to open it now, with this connectionstring: ... Security Info=False ...
    (borland.public.delphi.database.ado)
  • Re: TADOConnection using mixed Authenication
    ... that DSN so I know if it is using Windows or SQL authenication? ... > ConnectionString ... > but i'm not sure if 2 ADOConnections trying to connect to the same RDBMS ...
    (borland.public.delphi.database.ado)