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 ?