PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 25
→
SQLConnect com PostgresSQL
SQLConnect com PostgresSQL
Started by Antonio Carlos Coutinho, Feb., 21 2018 2:31 PM - No answer
Connect yourself…
Antonio Carlos Coutinho
#1
Posted on February, 21 2018 - 2:31 PM
Exemplo de uso do PostgresSQL
Server Port=5433;
-----
// compara a data do servidor com a data da máquina
s
Ip
is string
=
BuscaConfigValor
(
"IP"
)
//adriano
s
User
is string
=
BuscaConfigValor
(
"User"
)
//adriano
s
Pass
is string
=
BuscaConfigValor
(
"Pass"
)
//adriano
s
Port
is string
=
BuscaConfigValor
(
"Port"
)
//adriano
IF
SQLConnect
(
s
Ip
,
s
User
,
s
Pass
,
""
,
"OLEDB"
,
hNativeAccessPostgreSQL
,
s
Port
) >
0
THEN
//adriano
SQLExec
(
"SELECT CURRENT_DATE"
,
"QseData"
)
IF
SQLFetch
(
"QseData"
)
=
0
THEN
DtServer
is
Date
=
SQLGetCol
(
"QseData"
,
1
)
IF
DtServer
<
>
DateSys
(
)
THEN
Info
(
"A data de seu computador está errada, favor corrigir !"
)
EndProgram
(
)
END
END
END
----------
Em Close Window - Coloca para evitar travado o projeto sem ter que cancelar a tarefa pelo gerenciador do windows
----------
SQLDisconnect
(
)
//adriano
EndProgram
(
)
//adriano
Report
0
0
→ Go back to WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text