#1  
Old 5th March 2004, 04:48 AM
Henry - AR
 
Posts: n/a
Default Various Questions

Hi. I'M Henry.
I use NX 1.0100 (D5) and have some Q's:

-------------

1.
Can some1 point me to a [SQL with Params] code example (at runtime) ?

-------------

2.
Why myxnTable.Filter = NAME LIKE '%JO%' doesnt work? (when i exec that the
table clears)
Even if i execute it from the Enterprise Manager

-------------

3.
I have a client/server datamodule (remoteserverengine,etc.)
I have a dbgrid in my form, a nxtable, a datasource etc.
I have enabled ActiveDesignTime property to all components.
When i edit the dbgrid.colums i see disabled the icon "Add All Fields".
I think this behaviour is due to the nexusdb c/s arq. but well...
I have to add & define field by field to my dbgrid and it works fine.

-------------

4.
There's a nxDB.Connect procedure...
Why the nxDB.Disconnect is not available? I use nxDB.Active := false;
Which is the difference?
Can some1 point me to an "effective" code (with excpt. trapping) to check
& assure connection & disconnection from the nxdbserver?
I think following code is not really sure "effective" way.

try
nxSession.Open;
except
on E:Exception do
begin
MessageDlg('The server is offline.', mtWarning, [mbOK], 0);
end;
end;

Am i Wrong?
I tested it and it works, but have not tested in real LAN. It is C/S stuff.

-------------

5.
I have in my datamodule the nxWinsockTransport component.
I want to define some code for the nxWinsockTransportConnectionLost event.
But when i compile the code i get this error:
"[Error] UDataModule.pas(18): Undeclared identifier: 'TnxSessionID'"

I fixed it by adding nxllTypes to the uses... then:
i put in the nxWinsockTransportConnectionLost

Showmessage('Connection lost !! ... See u !!');
Application.Terminate;

I start the server, run my app, stop the server but i dont c the message...
so:

Can any1 tell me how could i do to tell that server "crashed" or the LAN UTP
cable
was cut <g> in the middle of my app execution?

-------------
eoQs.
Thanks !! Cya ppl !
______________________________
Henry
ICQ: 18048153
MSN: qbecerra at hotmail.com


  #2  
Old 5th March 2004, 01:36 PM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: Various Questions

> I use NX 1.0100 (D5) and have some Q's:

The current version is 1.03.01, email us at sales (at) nexusdb (dot) com if
you have not received any update emails. Make sure that you have no spam
filter at your pc or at your ISP which swallows our emails to you.

> 1.
> Can some1 point me to a [SQL with Params] code example (at runtime) ?


We are very compatible with TTable and TQuery. Therefore, your Delphi
manuals and help files will be largely compatible with our components. A
good help file topic is "Params Example".

> 2.
> Why myxnTable.Filter = NAME LIKE '%JO%' doesnt work? (when i exec
> that the table clears)
> Even if i execute it from the Enterprise Manager


LIKE is not supported in table filters. It only works in SQL.

> 3.
> I have a client/server datamodule (remoteserverengine,etc.)
> I have a dbgrid in my form, a nxtable, a datasource etc.
> I have enabled ActiveDesignTime property to all components.
> When i edit the dbgrid.colums i see disabled the icon "Add All
> Fields".
> I think this behaviour is due to the nexusdb c/s arq. but well...
> I have to add & define field by field to my dbgrid and it works fine.


I have to add a field first, then the "Select All" item becomes active. I am
guessing it is a Delphi 5 bug. It works correctly in Delphi 7.

> 4.
> There's a nxDB.Connect procedure...
> Why the nxDB.Disconnect is not available? I use nxDB.Active := false;
> Which is the difference?


Connect sets Active, so no real difference. Its just an internal method.

> Can some1 point me to an "effective" code (with excpt. trapping) to
> check & assure connection & disconnection from the nxdbserver?
> I think following code is not really sure "effective" way.
>
> try
> nxSession.Open;
> except
> on E:Exception do
> begin
> MessageDlg('The server is offline.', mtWarning, [mbOK], 0);
> end;
> end;


Looks fine to me, except that you should add the exception text to the
message, or log it somewhere.

> 5.
> I have in my datamodule the nxWinsockTransport component.
> I want to define some code for the nxWinsockTransportConnectionLost
> event. But when i compile the code i get this error:
> "[Error] UDataModule.pas(18): Undeclared identifier: 'TnxSessionID'"


As outlined in our downloadable manual, OnConnectionLost is not implemented
yet.

> Can any1 tell me how could i do to tell that server "crashed" or the
> LAN UTP cable
> was cut <g> in the middle of my app execution?


The way to do it is to wrap your database handling with exception handlers
that can detect the right exception. If the connection was lost, attempting
a database operation will result in a DBIERR_SERVERCOMMLOST error code.

--

Eivind Bakkestuen [NDD]
Please, no email unless requested.
Search Borland and third-party newsgroups here: www.tamaracka.com


  #3  
Old 6th March 2004, 12:08 AM
Henry - AR
 
Posts: n/a
Default Re: Various Questions

Hi Eivind...
Would u mind to send me some code example to do that?
Thanks ALOT

"Eivind Bakkestuen [NDD]" <Ieivind.bakkestuenHATE@nexusdb.comSPAM> escribió
en el mensaje news:4047e814$1@wic040d....

> > Can any1 tell me how could i do to tell that server "crashed" or the
> > LAN UTP cable
> > was cut <g> in the middle of my app execution?

>
> The way to do it is to wrap your database handling with exception handlers
> that can detect the right exception. If the connection was lost,

attempting
> a database operation will result in a DBIERR_SERVERCOMMLOST error code.



  #4  
Old 6th March 2004, 11:20 AM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: Various Questions

> Would u mind to send me some code example to do that?
> Thanks ALOT


These newsgroups are indexed by Tamaracka (link below). Search the borland
groups for "^nexusdb DBIERR_SERVERCOMMLOST" and read through the "client
should close down gracefully" thread. There are samples there.


--

Eivind Bakkestuen [NDD]
Please, no email unless requested.
Search Borland and third-party newsgroups here: www.tamaracka.com




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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Some questions Alessandro Romano nexusdb.public.support.thirdparty 10 6th August 2005 03:36 AM
Some SQL questions Stefan Paege nexusdb.public.support.sql 3 6th February 2004 12:45 AM
3 questions Pierre Demers nexusdb.public.support 17 12th November 2003 11:35 PM
Few questions JC Boggio nexusdb.public.support 1 4th September 2003 12:25 PM
More questions...to anyone who can help! Robert Meek nexusdb.public.support 29 18th August 2003 10:01 AM


All times are GMT +11. The time now is 06:59 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.