dbTalk Databases Forums  

Logoff ODBC conection

comp.databases.pick comp.databases.pick


Discuss Logoff ODBC conection in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Catalin Lungu
 
Posts: n/a

Default Logoff ODBC conection - 01-11-2006 , 07:03 AM






Hi all,
Is there any way to logoff an ODBC conection from telnet emulator. I have an
VB aplication and when it crash the d3odbc line it still conected (not
always). Of course the number of licence decrease. Ejecuting "logoff pib" or
"reset-user pib" the result is "[534] logoff succesfully" or "[536] already
logoff" but is not true, the line is still busy.

Any idea?

Thanks,
Catalin



Reply With Quote
  #2  
Old   
Catalin Lungu
 
Posts: n/a

Default Re: Logoff ODBC conection - 01-11-2006 , 08:58 AM






By the way, I use D3NT 7.2.0, WinXP, D3ODBC 2.7 and VB6.

"Catalin Lungu" <lcatalin (AT) siadv (DOT) com> escribió en el mensaje
news:dq2vnj$es3$1 (AT) nsnmrro2-gest (DOT) nuria.telefonica-data.net...
Quote:
Hi all,
Is there any way to logoff an ODBC conection from telnet emulator. I have
an VB aplication and when it crash the d3odbc line it still conected (not
always). Of course the number of licence decrease. Ejecuting "logoff pib"
or "reset-user pib" the result is "[534] logoff succesfully" or "[536]
already logoff" but is not true, the line is still busy.

Any idea?

Thanks,
Catalin





Reply With Quote
  #3  
Old   
Jeffrey Kaufman
 
Posts: n/a

Default Re: Logoff ODBC conection - 01-11-2006 , 09:37 AM



On D3/Linux there is an odbc.menu where you can stop and start the link.
Perhaps it is also in NT.

"Catalin Lungu" <lcatalin (AT) siadv (DOT) com> wrote

Quote:
By the way, I use D3NT 7.2.0, WinXP, D3ODBC 2.7 and VB6.

"Catalin Lungu" <lcatalin (AT) siadv (DOT) com> escribió en el mensaje
news:dq2vnj$es3$1 (AT) nsnmrro2-gest (DOT) nuria.telefonica-data.net...
Hi all,
Is there any way to logoff an ODBC conection from telnet emulator. I
have
an VB aplication and when it crash the d3odbc line it still conected
(not
always). Of course the number of licence decrease. Ejecuting "logoff
pib"
or "reset-user pib" the result is "[534] logoff succesfully" or "[536]
already logoff" but is not true, the line is still busy.

Any idea?

Thanks,
Catalin







Reply With Quote
  #4  
Old   
jra
 
Posts: n/a

Default Re: Logoff ODBC conection - 01-11-2006 , 10:22 AM



Hi Catalin:

It is not very easy. And less in NT.

Many times you must stop D3 and restart it.

But , in my experience with the D3ODBC library, many years since C4, is
that in ALL the situations, the problem is in the VB program.

Usually:

Objects not closed. It is not only that yo have not closed the
connection, it is that sometimes if you close the connection objetc but
you still have some object created form the connection it cannot close
the D3 Pib. For instance if you have a file or a rulemodule created by
d3conexion.bropenfile or d3conexion.bropenrulemodule and you try to
d3env.brcloseconnection d3conexion, before doing a
d3conexion.brclosefile or d3conexion.brcloserulemodule it cannot close
the connection.

Take a look at your code

Hope this help
joseba


Reply With Quote
  #5  
Old   
Catalin Lungu
 
Posts: n/a

Default Re: Logoff ODBC conection - 01-11-2006 , 11:07 AM



The problem come when users provoke abnormal exit. In this case I can't
control nothing. Also, when I forget to delete a debug command the same
case. The VB client is freeze and the user close the task. With telnet
sesion client is very easy, employing logoff command everything is ok. With
socket session, too. The same application work with 2 types of connection:
odbc and socket and the problem only occure with odbc.

Catalin.

"jra" <frelance (AT) sarenet (DOT) es> escribió en el mensaje
news:1136996535.535429.228270 (AT) g44g2000cwa (DOT) googlegroups.com...
Quote:
Hi Catalin:

It is not very easy. And less in NT.

Many times you must stop D3 and restart it.

But , in my experience with the D3ODBC library, many years since C4, is
that in ALL the situations, the problem is in the VB program.

Usually:

Objects not closed. It is not only that yo have not closed the
connection, it is that sometimes if you close the connection objetc but
you still have some object created form the connection it cannot close
the D3 Pib. For instance if you have a file or a rulemodule created by
d3conexion.bropenfile or d3conexion.bropenrulemodule and you try to
d3env.brcloseconnection d3conexion, before doing a
d3conexion.brclosefile or d3conexion.brcloserulemodule it cannot close
the connection.

Take a look at your code

Hope this help
joseba




Reply With Quote
  #6  
Old   
jra
 
Posts: n/a

Default Re: Logoff ODBC conection - 01-11-2006 , 04:12 PM



Hi Catalin:

When the problem is a debug or a sub without return or something like
that, you cannnot do anything, test,test and test. F.I. if from telnet
you try to delete an item on a file and the item does not exist,
nothing happens. But if you do so from VB, the program crashes (worse,
it works but nothing actually works).

I use two sets of programs. One for telnet etc, and one for
client-server. originally because i reuse a lot of code and do not want
to flash all my subs. It gives me double work but .....

Welcome to client server. The testing and debuging is much more
difficult but MUST BE DONE. If you spend many time doing it. it works
very well. If not, forget it.

Take care also with many things we (pickies) forget. F.I. if you want
to sum a+b and a,b cames from D3, you must convert it to integer, long,
double, etc. Usually , if you work with d3 you always use ON ERROR
RESUME NEXT. You need it, but it is VERY DANGEROUS. F.I. if you have
that sentence and A is a letter, the instruction xxx=cdbl(a) gives an
error, continue to next sentence and the a value is the previus one it
had. And you discover the error 2 months later with all the
calculations wrong.

I know that with a good practice of programing this must not happen, i
know also that with a good database definition you cannot have an A in
a numeric atribute, but in the real world i do not know that kind of
database, worse, i know very good databases designs that has not an A
in a numeric atribute but has many empty values when VB wants a 0.
Before talking about nulls or empty.

ALWAYS, i say ALWAYS use the OPTION EXPLICIT clause. ALWAYS. Variants
are worse than FGE in R83.

I do not want you go away of this. It works very good, but you MUST
have a lot of care. New times.

If you has begun few time ago with this, i recomend you to go to MV.net
or PDP.net, the .net Microsoft platform. They has a cost, but actually,
Microsoft has not work with dlll and the D3CLODBC.DLL thecnology, so

Hope this help


joseba

P.S.

It is a bit complicated when you begin but in a few time you discover
the tricks and works fine. If you need some help e-mail me. You can
find my e-mail in the Raining Data forums


Reply With Quote
  #7  
Old   
Bill H
 
Posts: n/a

Default Re: Logoff ODBC conection - 01-11-2006 , 11:37 PM



Catalin:

I'm not sure of the versioning but in D3NT you might try:

reset-user PortNo (X

or in D3Linux you can try:

logoff PortNo (k

Hope this helps.

Bill

"Catalin Lungu" <lcatalin (AT) siadv (DOT) com> wrote

Quote:
Hi all,
Is there any way to logoff an ODBC conection from telnet emulator. I have
an VB aplication and when it crash the d3odbc line it still conected (not
always). Of course the number of licence decrease. Ejecuting "logoff pib"
or "reset-user pib" the result is "[534] logoff succesfully" or "[536]
already logoff" but is not true, the line is still busy.

Any idea?

Thanks,
Catalin





Reply With Quote
  #8  
Old   
Mark Brown
 
Posts: n/a

Default Re: Logoff ODBC conection - 01-12-2006 , 02:11 AM



The problem is that the user logged on via ODBC is a FlashBasic user and so
has shelled out to (in this case) DOS. It can't be killed because Pick
can't know what it's doing and what system resources it might be tying up.
That's why you see PX.RESUME. It means PX (shell processor) has popped up
into virtual for something (file i/o, terminal i/o, etc) and has "resumed"
running in the shell.

You might try killing the ODBC service, if this is a small test. If it's an
ongoing problem, obviously that's not a solution. Here's how it works:

ODBC client calls ODBC server which calls D3ODBC which (basically) executes
a D3TCL command to run a service which runs at the FlashBasic level for
speed and memory managment. When your app dies, it doesn't send a message
to D3ODBC saying "I've died. You can go ahead and die now too." So Pick
just sits there waiting patiently for your next request.

Mark Brown


"Bill H" <notme (AT) bogus (DOT) com> wrote

Quote:
Catalin:

I'm not sure of the versioning but in D3NT you might try:

reset-user PortNo (X

or in D3Linux you can try:

logoff PortNo (k

Hope this helps.

Bill

"Catalin Lungu" <lcatalin (AT) siadv (DOT) com> wrote in message
news:dq2vnj$es3$1 (AT) nsnmrro2-gest (DOT) nuria.telefonica-data.net...
Hi all,
Is there any way to logoff an ODBC conection from telnet emulator. I have
an VB aplication and when it crash the d3odbc line it still conected (not
always). Of course the number of licence decrease. Ejecuting "logoff pib"
or "reset-user pib" the result is "[534] logoff succesfully" or "[536]
already logoff" but is not true, the line is still busy.

Any idea?

Thanks,
Catalin







Reply With Quote
  #9  
Old   
Catalin Lungu
 
Posts: n/a

Default Re: Logoff ODBC conection - 01-13-2006 , 01:47 AM



Hi and thank you all for your support,
I have customers which works with 5-20 simultaneous connection so I can't
kill the server service. If an error occures during execution of D3 rutine
VB does not find out. I solved the problem, I hope so, making an application
that monitors all connection at server's local port (1603). This way allows
me to free hung connections. At the moment I use this and soon I hope to
migrate to .net

Regards,
Catalin



Reply With Quote
  #10  
Old   
Gene
 
Posts: n/a

Default Re: Logoff ODBC conection - 01-16-2006 , 09:30 PM



Bill H <notme (AT) bogus (DOT) com> wrote:
Quote:
Catalin:

I'm not sure of the versioning but in D3NT you might try:

reset-user PortNo (X
Bill, that works in D3/Linux as well. I do it on a daily basis.

The trick to avoiding those obscene fees for using .Net with D3 is to
install the latest ODBC driver, but use the d3vbodbc.dll file from the
C4 release. I've got a number of VB.Net applications running just fine
on that.

g.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.