Tdsn

Tdsn

Postby Silvio » Tue Nov 08, 2005 8: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 :
Code: Select all  Expand view  RUN
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
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Tdsn

Postby Lautaro » Fri Nov 11, 2005 1: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
User avatar
Lautaro
 
Posts: 322
Joined: Fri Oct 07, 2005 2:44 pm
Location: Osorno, Chile

Postby Silvio » Fri Nov 11, 2005 10:06 pm

Sorry but I make with nTypeDsn := 1
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 46 guests