|
Install HFSQL and Create ConfigDB.ini at workstations
//----------------- CONEXAO DO BANCO DE DADOS DO PROJETO ------------------""
Banco is string = INIRead("Database","Banco","",fCurrentDir()+"\ConfigDB.ini") DNS_IP is string = INIRead("Database","DNS-IP","",fCurrentDir()+"\ConfigDB.ini") Porta is string = INIRead("Database","Porta","",fCurrentDir()+"\ConfigDB.ini") Usuario is string = INIRead("Database","Usuario","",fCurrentDir()+"\ConfigDB.ini") Senha is string = INIRead("Database","Senha","",fCurrentDir()+"\ConfigDB.ini")
IF Usuario = "" AND Senha = "" THEN Open(WIN_ConfigDatabase) END
MyHfsql01 is Connection MyHfsql01..Provider = hAccessHFClientServer MyHfsql01..Database = Banco MyHfsql01..Server = DNS_IP MyHfsql01..Source = DNS_IP MyHfsql01..User = Usuario MyHfsql01..Password = Senha
HOpenConnection(MyHfsql01) HChangeConnection("*",MyHfsql01) HModifyStructure("*") HCreationIfNotFound("*")
|
| |
| |
| Illustrations, screen shots |
|
| |
(To evaluate this resource, click 'Write a review') |
| | | |
No review or comment? Be the first one! |
GLOBAL // DEFINIÇÃO DE PORTAS DIFERENTES É EM SOURCE OK// Banco is string = INIRead("Database","Banco","",fCurrentDir()+"\ConfigDB.ini") DNS_IP is string = INIRead("Database","DNS-IP","",fCurrentDir()+"\ConfigDB.ini") Porta is string = INIRead("Database","Porta","",fCurrentDir()+"\ConfigDB.ini") Usuario is string = INIRead("Database","Usuario","",fCurrentDir()+"\ConfigDB.ini") Senha is string = INIRead("Database","Senha","",fCurrentDir()+"\ConfigDB.ini")
IF Usuario = "" AND Senha = "" THEN Open(WIN_ConfigDatabase) END
MyHfsql01 is Connection MyHfsql01..Provider = hAccessHFClientServer MyHfsql01..Database = Banco MyHfsql01..Server = DNS_IP MyHfsql01..Source = DNS_IP +":"+ Porta MyHfsql01..User = Usuario MyHfsql01..Password = Senha
HModifyStructure("*") HCreationIfNotFound("*") IF HOpenConnection(MyHfsql01) = True THEN IF HChangeConnection("*",MyHfsql01) = True THEN ToastDisplay("Conexao com sucesso!",toastLong,vaMiddle,haCenter) ELSE Error(HErrorInfo()) END
ELSE Error(HErrorInfo()) END |
| GLOBAL Banco is string = INIRead("Database","Banco","",fCurrentDir()+"\ConfigDB.ini") DNS_IP is string = INIRead("Database","DNS-IP","",fCurrentDir()+"\ConfigDB.ini") Porta is string = INIRead("Database","Porta","",fCurrentDir()+"\ConfigDB.ini") Usuario is string = INIRead("Database","Usuario","",fCurrentDir()+"\ConfigDB.ini") Senha is string = INIRead("Database","Senha","",fCurrentDir()+"\ConfigDB.ini")
IF Usuario = "" AND Senha = "" THEN Open(WIN_ConfigDatabase) END
MyHfsql01 is Connection MyHfsql01..Provider = hAccessHFClientServer MyHfsql01..Database = Banco MyHfsql01..Server = DNS_IP MyHfsql01..Source = DNS_IP MyHfsql01..User = Usuario MyHfsql01..Password = Senha
HModifyStructure("*") HCreationIfNotFound("*") IF HOpenConnection(MyHfsql01) = True THEN IF HChangeConnection("*",MyHfsql01) = True THEN ToastDisplay("Conexao com sucesso!",toastLong,vaMiddle,haCenter) ELSE Error(HErrorInfo()) END
ELSE Error(HErrorInfo()) END |
| | |
|