Nagyro.ini ====================== [Nagyro] Server = 192.168.1.180 User = sa Password = 777777777 BD = producao ======================
PROCEDURE DB_Inicialize(TrueFalse)
Server, User, Password, BD is string
IF TrueFalse = True THEN PathFile is string = fCurrentDir(fCurrentDrive()) +"\Nagyro.ini" IF fFileExist(PathFile) = True THEN Server = INIRead("Nagyro", "Server", "", PathFile) IF ErrorOccurred THEN Error() END User = INIRead("Nagyro", "User", "", PathFile) IF ErrorOccurred THEN Error() END Password = INIRead("Nagyro","Password", "", PathFile) IF ErrorOccurred THEN Error() END BD = INIRead("Nagyro", "BD", "", PathFile) IF ErrorOccurred THEN Error() END HCloseConnection(ConnNativa) ConnNativa..Server = Server ConnNativa..User = User ConnNativa..Password = Password ConnNativa..Database = BD ConnNativa..Provider = hNativeAccessSQLServer ConnNativa..Access = hOReadWrite ConnNativa..ExtendedInfo = "Extended information" ConnNativa..CursorOptions = hClientCursor ok is boolean = HOpenConnection(ConnNativa) IF ok = False Info(ErrorInfo()) Close() END END END
|