GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV 2024
→
How to start Socket connections in stored procedures
How to start Socket connections in stored procedures
Iniciado por Simon Phillips, dez., 08 2019 3:32 PM - 2 respostas
Conecte-se…
Simon Phillips
#1
Publicado em dezembro, 08 2019 - 3:32 PM
Hi all.
I need to start a Socket connection on my server to connect to an external company. However, the function SocketConnect is not available in Stored Procedures.
Basically what I need to do is:
My customer app connects to my Server and updates a file in C/S. Simple enough.
This would trigger a stored procedure on my server which takes those details and opens up a Socket conversation with one of many companys to check availablity etc.
They then reply to my server with an answer via the socket.
I reply back to my user.
The ideal way would be to directly connect to the Client's databases, but not all will allow that, so Socket conversations seem the best way.
Problem is that my server cannot open a Socket as SocketConnect is not available in the Stored procedures on my server.
The only alternative is for a stored procedure to write the required details to a HF file and then have a separate exe running on the server which is constantly reading the file and doing the socket conversation separatley. This however is a very messy way to have to do this.
Any ideas would be appreciated.
Simon
Denunciar
0
0
Ben Dell
#2
Publicado em dezembro, 11 2019 - 7:42 AM
Hi
An external process that does the connection and transfer is the only real way to do this.
You do not want a socket connection to hold up you database processes, specially when connecting to someone other than yourself.
I would suggest Put all the data or commands into a queue - a file in your case - and process them by means of an external service that runs.
Kind regards
Denunciar
0
0
Simon Phillips
#3
Publicado em dezembro, 13 2019 - 12:00 PM
Hi Ben
Thats what I am begining to think. It seems that the only way to do it is as you suggest, to load a temporary file and let the socket app constantly read them. It would be nice if there was a more direct way to get the stored procedure to send a message directly to the Socket app to instruct it to start communicating. However all the function that I have tried (DDE, SendKey) cannot be used in a stored procedure.
Maybe I need to download some more Punjabi tunes to get the brain working!
Simon
Denunciar
0
0
→ Voltar para WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto