Tdsn

Post Reply
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Tdsn

Post by Silvio »

I have a class Tdsn
I saw the esamples but I must create a dsn of USER
the class say if you set 1 the type you can set dsnUser or 0 if you can set dsnSystem
I create the string :

Code: Select all

FUNCTION Main()
LOCAL oDsn
  LOCAL nTypeDsn

  oDsn := TDsn():New( "MwWind" )
//--------------------------------------------------------
  // Si nStatus da error, el DSN no existe
  //--------------------------------------------------------
  IF oDsn:nStatus <> TDSN_NO_ERROR
    IF MsgYesNo( OemToAnsi( "¨ Desideri settare la configuazione per Mwwind ?" ) ,;
          "Mwwind" ) == .F.
      nTypeDsn := 1
    ENDIF
oDsn:Create( "MwWind", ;
                 "DSN creato per Mwwind", ;
                 "Microsoft Access Driver (*.mdb)", ;
                 "", ;
                 "", nTypeDsn,, )
  ENDIF

  MsgInfo( oDsn:cGenPrg(), "Demo TDSN")
  oDsn:Del()
oDsn:End()
RETURN NIL
the nTypeDsn := 1 it must set the dsnUser but it set dsnSystem

why it set the dsnSystem ?
User avatar
Lautaro
Posts: 322
Joined: Fri Oct 07, 2005 2:44 pm
Location: Osorno, Chile
Contact:

Tdsn

Post by Lautaro »

Here the information

#define TDSN_SYSTEM_DSN 0
#define TDSN_USER_DSN 1

This define are in the TDSN.CH

Atte,
Lautaro Moreira
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

Sorry but I make with nTypeDsn := 1
Post Reply