FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Tdsn
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Tdsn
Posted: Tue Nov 08, 2005 08:32 PM
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 :
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 ?
Best Regards, Saludos



Falconi Silvio
Posts: 337
Joined: Fri Oct 07, 2005 02:44 PM
Tdsn
Posted: Fri Nov 11, 2005 01:00 PM

Here the information

define TDSN_SYSTEM_DSN 0

define TDSN_USER_DSN 1

This define are in the TDSN.CH

Atte,
Lautaro Moreira

Hola,

Soy un Contador que por necesidad aprendio a programar y se quedo programando.
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Tdsn
Posted: Fri Nov 11, 2005 10:06 PM

Sorry but I make with nTypeDsn := 1

Best Regards, Saludos



Falconi Silvio

Continue the discussion