PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 25 → Configurar Webdev para ler conexao desde .ini
Configurar Webdev para ler conexao desde .ini
Started by TOM SILVA / RMT SYST, Jun., 09 2016 1:13 AM - 1 reply
Registered member
7 messages
Popularité : +2 (2 votes)
Posted on June, 09 2016 - 1:13 AM
Formato ini
[SERVER]
Provider = hAccessHFClientServer
User = ADMIN
Password = 123456
Server = localhost
Database = edfactura
CryptMethod = hCryptNo

Codigo Inicializar o sistema.
dbProvider is string
dbUser is string
dbPassword is string
dbServer is string
dbDatabase is string
dbCryptMethod is string

dbProvider = INIRead("SERVER", "Provider", "",fWebDir()+"\conexion.ini")
dbUser = INIRead("SERVER", "User", "",fWebDir()+"\conexion.ini")
dbPassword = INIRead("SERVER", "Password", "",fWebDir()+"\conexion.ini")
dbServer = INIRead("SERVER", "Server", "",fWebDir()+"\conexion.ini")
dbDatabase = INIRead("SERVER", "Database", "",fWebDir()+"\conexion.ini")
dbCryptMethod = INIRead("SERVER", "CryptMethod", "",fWebDir()+"\conexion.ini")


New_connection is Connection

// Parameters of the connection
New_connection..Provider = dbProvider
New_connection..User = dbUser
New_connection..Password = dbPassword
New_connection..Server =dbServer
New_connection..Database = dbDatabase
//New_connection..CryptMethod = dbCryptMethod

// Opening the connection
HOpenConnection(New_connection)


Creditos: Willian Padilha - PY
Message modified, June, 09 2016 - 1:15 AM
Registered member
7 messages
Popularité : +2 (2 votes)
Posted on June, 09 2016 - 1:17 AM
Quem quiser ajudar no post acrecentar o codigo para criptografar a senha ... Fique a vontade.