|
Accueil → WINDEV 25 → WX - DB Inicialize MsSqlServer Driver Nativo com abertura de sessão da Base de Dados |
WX - DB Inicialize MsSqlServer Driver Nativo com abertura de sessão da Base de Dados |
Débuté par adrianoboller, 08 juil. 2015 22:22 - 2 réponses |
| |
| | | |
|
| |
Membre enregistré 3 651 messages Popularité : +175 (223 votes) |
|
Posté le 08 juillet 2015 - 22:22 |
Procedure db_inicialize(USUARIO, SENHA, BASE, SERVER)
OK is boolean
H.SQLServerMode = 0
qyrUser is Data Source
OK1 is boolean = SQLDisconnect()
OK2 is boolean = HDescribeConnection(Connect, USUARIO, SENHA, SERVER, BASE, hNativeAccessSQLServer, hOReadWrite, "Extended info", hClientCursor)
OK3 is boolean= HOpenConnection(Connect)
OK4 is boolean = HChangeConnection("*",Connect)
OK5 is boolean = HExecuteSQLQuery(qyrUser,Connect,hQueryWithoutCorrection,"EXECUTE AS USER = '"+USUARIO+"'")
IF OK2 = True AND OK3 = True AND OK4 = True AND OK5 = True THEN OK = True ELSE OK = False END
RESULT(OK) |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 651 messages Popularité : +175 (223 votes) |
|
Posté le 23 avril 2016 - 01:04 |
Prezados,
Para usar outra porta, não a padrão:
Se informar o IP + “,” + Porta (com vírgula) funciona.
Porem, se informar a porta não é possivel informar a instância do MSSQLSERVER:
Tentando informar a instância:
Ser informar a porta correta é possivel informar QUALQUER COISA na instância que não acusa erro de conexão:
Ou seja, use vírgula para definir a nova porta diferente da padrão, ok
-- Adriano José Boller ______________________________________________ Consultor e Representante Oficial da PcSoft no Brasil +55 (41) 9949 1800 adrianoboller@gmail.com skype: adrianoboller http://wxinformatica.blogspot.com.br/ |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 651 messages Popularité : +175 (223 votes) |
|
Posté le 10 août 2017 - 22:22 |
NextTitle("Atenção") ok1, ok2, ok3, ok4, ok5, ok6, ok7, ok8, LoginOK is boolean
sGsPaginaInicial is string = "PAGE_Logado" nReturnedValue is int = 0
gpwUser is Data Source < CNT_GPW is Connection CNT_GPW..Provider = hNativeAccessSQLServer CNT_GPW..User = "integracao-wd" CNT_GPW..Password = "4s31nt!360" CNT_GPW..Source = "192.168.0.217\360" CNT_GPW..Database = "360_catalogo" CNT_GPW..CryptMethod = hCryptNo
ok1 = gpwOpenConnection(CNT_GPW)
ok2 = HOpenConnection(CNT_GPW) IF ok2 = False THEN Info(ErrorOccurred() +" - "+ HErrorInfo()) END
ok3 = HChangeConnection(gpwUser,CNT_GPW)
IF ErrorInfo() > 0 OR ok3 = False Error(HErrorInfo() + CR + ErrorInfo()) END
-- Adriano José Boller ______________________________________________ Consultor e Representante Oficial da PcSoft no Brasil +55 (41) 99949 1800 adrianoboller@gmail.com skype: adrianoboller http://wxinformatica.com.br/ |
| |
| |
| | | |
|
| | | | |
| | |
|