Delphi TCP/IP on WIN NT 3.51 
Author Message
 Delphi TCP/IP on WIN NT 3.51

I found out something very very strange. When I run my Delphi-Program
on WIN NT 3.51 it is really slow when connecting to my InterBase Sever 4.0
connecting via TCP/IP (Netbios does not work).

But when I'll run the same program on an Window WFW Client connected to
the same NT-System it runs as fast as you can expect it to do.

So can anyone help me ??

/Nils

--
______________________________________________________________________________
     _/    _/  _/    _/  _/_/_/
    _/_/  _/  _/    _/  _/    _/     NHD-Softwaresysteme
   _/  _/_/  _/_/_/_/  _/    _/      Dipl.-Inform. Nils H. Dzubiel
  -/    _/  _/    _/  _/    _/       An der Rossmuehle 15
 _/    _/  _/    _/  _/_/_/          47835 Krefeld - Huels, Germany

                 "What do >you< care, what other people think ?"              



Wed, 04 Feb 1998 03:00:00 GMT  
 Delphi TCP/IP on WIN NT 3.51

: I found out something very very strange. When I run my Delphi-Program
: on WIN NT 3.51 it is really slow when connecting to my InterBase Sever 4.0
: connecting via TCP/IP (Netbios does not work).

        On a similar note, our company's application written in Delphi
under NT 3.51 is very slow when connecting and workin with a Paradox
database.

Mike.

--
====================================================================

Northstar Technologies                        Compuserve: 76620,2534
Newmarket, Ontario, CANADA



Thu, 05 Feb 1998 03:00:00 GMT  
 Delphi TCP/IP on WIN NT 3.51
I have three databases (DBase).  Table1 is a tempory database, Table2
and Table3 are permanent databases.  At close of business, the records in
Table1 have to be appended to Table2 or copied to Table3.

I have no problems with all fields, except the TMemofield.  The contents
of the Table1.TMemoField is text.  (It is being used to keep customer
comments, contents can vary from Nill to in excess of 255 characters, so
I am forced to use a TMemoField)

Any help would be really appreciated.

Thanks in advance.

Sandy Kent
Martock Software
Windsor. Nova Scotia. Canada



Thu, 05 Feb 1998 03:00:00 GMT  
 Delphi TCP/IP on WIN NT 3.51

: I have no problems with all fields, except the TMemofield.  The contents
: of the Table1.TMemoField is text.  (It is being used to keep customer
: comments, contents can vary from Nill to in excess of 255 characters, so
: I am forced to use a TMemoField)
What's the problem exactly? Do you want to load the contents of the TMemofield
in a String/PChar? Then you discovered a feature of the BDE which is not yet
implemented - the only way to get the contents of a Memofield is via the
TDBMemo-component, to load the data into a PChar you then can use the
GetText-Method of the Memo component. Note that the help file claims that you
can use TMemofield in you code, so the BDE is not up to date to its
documentation. The same problem holds for the TBlobField.

Question to all: Is this corrected in the Delphi patches (haven't patched
mine yet), or must I wait for Delphi 32 with BDE 32?

Bye,
   Andy

--
----------------------------------------------------------------------------
Andreas H"orstemeier                       | "Wenn ist das Nunstueck git



fido:  2:2444/4505.3                       |                  (Monty Python)
----------------------------------------------------------------------------  



Fri, 06 Feb 1998 03:00:00 GMT  
 Delphi TCP/IP on WIN NT 3.51

: I have three databases (DBase).  Table1 is a tempory database, Table2
: and Table3 are permanent databases.  At close of business, the records in
: Table1 have to be appended to Table2 or copied to Table3.

: I have no problems with all fields, except the TMemofield.  The contents
: of the Table1.TMemoField is text.  (It is being used to keep customer
: comments, contents can vary from Nill to in excess of 255 characters, so
: I am forced to use a TMemoField)

: Any help would be really appreciated.

1) You can use a BatchMove component if it is convenient for you.
else:
2) The text property is limited to the first 255 bytes of the memo content.
You can use the stream handling methods of the memo (Sorry exact names
not at hand, probably LoadFromStream and SaveToStream).

Regards,
Matthias
--


Institut fuer Psychologie
Gosslerstr. 14
D-37073 Goettingen



Fri, 06 Feb 1998 03:00:00 GMT  
 Delphi TCP/IP on WIN NT 3.51

: I have three databases (DBase).  Table1 is a tempory database, Table2
: and Table3 are permanent databases.  At close of business, the records in
: Table1 have to be appended to Table2 or copied to Table3.

: I have no problems with all fields, except the TMemofield.  The contents
: of the Table1.TMemoField is text.  (It is being used to keep customer
: comments, contents can vary from Nill to in excess of 255 characters, so
: I am forced to use a TMemoField)

As mentioned in another article in this thread, you could use a TBatch-
Move component to copy data from one table to another. This will also
copy memo data.

Your reference to "having" to use a TMemo component is confusing. If you
want to use a TMemo for editing memo data but not have it directly con-
nected to the underlying field, the TMemo can be used for this. Copying
memo data between the TMemo and the memo field is very simple, and can be
accomplished with a single command line. For example, if a TMemoField
component was created with the Fields Editor, here is the command to copy
the memo data from the TMemo to the memo field:

  Table1Notes.Assign(Memo1.Lines);

To go the other way:

  Memo1.Lines.Assign(Table1Notes);

If no TMemoField component was created, you can typecast the return value
from the Fields property or the FieldByName method (both return a value
of type TFields) as a TMemoField:

  TMemoField(Table1.FieldByName('Notes')).Assign(Memo1.Lines);

--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Steve Koterski               _/   The opinions expressed here are    _/

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/



Sat, 07 Feb 1998 03:00:00 GMT  
 Delphi TCP/IP on WIN NT 3.51

: : I have no problems with all fields, except the TMemofield.  The contents
: : of the Table1.TMemoField is text.  (It is being used to keep customer
: : comments, contents can vary from Nill to in excess of 255 characters, so
: : I am forced to use a TMemoField)
: What's the problem exactly? Do you want to load the contents of the TMemofield
: in a String/PChar? Then you discovered a feature of the BDE which is not yet
: implemented - the only way to get the contents of a Memofield is via the
: TDBMemo-component, to load the data into a PChar you then can use the
: GetText-Method of the Memo component. Note that the help file claims that you
: can use TMemofield in you code, so the BDE is not up to date to its
: documentation. The same problem holds for the TBlobField.

: Question to all: Is this corrected in the Delphi patches (haven't patched
: mine yet), or must I wait for Delphi 32 with BDE 32?

What, exactly, is it that you request be fixed?

Copying data back and forth between a PChar variable and a memo (or BLOB)
field is not that difficult, and is supported in Delphi and the BDE. Use
the TBlobStream object. The TBlobStream offers typical file-access methods
such as Seek, Read, and Write which allow you to read directly from or
write directly to a memo or BLOB field -- without any need for a data-
aware component such as a TDBMemo or a TDBImage. Copying from a Pascal
String variable to a memo is also supported, in as far as you can convert
that String into a PChar for use with a TBlobStream object.

Here is an example code snippet that copies a String value (from a field
in a dBASE table) into the memo field of a Paradox table (though the same
method works with all memo types).

procedure TForm1.Button1Click(Sender: TObject);
var
  BS: TBlobStream;
  PC: array [0..255] of Char;
  b: Byte;
begin
  Table2.Edit;
  b := 255;
  BS := TBlobStream.Create(TBlobField(Table2.Fields[1]), bmWrite);
  FillChar(PC, b, #0);
  try
    StrPCopy(PC, Table1.Fields[1].AsString);
    BS.Write(PC, b);
  finally
    BS.Free;
  end;
  Table2.Post;
end;

--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Steve Koterski               _/   The opinions expressed here are    _/

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/



Sat, 07 Feb 1998 03:00:00 GMT  
 Delphi TCP/IP on WIN NT 3.51

Quote:


>: I found out something very very strange. When I run my Delphi-Program
>: on WIN NT 3.51 it is really slow when connecting to my InterBase Sever 4.0
>: connecting via TCP/IP (Netbios does not work).
>    On a similar note, our company's application written in Delphi
>under NT 3.51 is very slow when connecting and workin with a Paradox
>database.
>Mike.

Make sure you're running Delphi or your app. under separate memory
space.  It does help.


Sun, 08 Feb 1998 03:00:00 GMT  
 Delphi TCP/IP on WIN NT 3.51

Quote:

>Question to all: Is this corrected in the Delphi patches (haven't patched
>mine yet), or must I wait for Delphi 32 with BDE 32?

Not a matter of patches or unimplemented features, just misleading docs.
You can use a TBlobstream to access a database memo field, even if you have
no Tmemo component (or indeed, even if the field doesn't appear in the
table's field list -- use FieldByName to get the field, and case it).

If this doesn't give you enough of a pointer, post back here and I'll come
up with a code snippet (Steve posted a good one a week or three back --
still got it Steve?).

--
cheers,
peter

--
==============================================================================
     Peter Hyde, South Pacific Information Services Ltd, Christchurch, NZ
       Makers of TCompress File and Database Compression Components



Sun, 08 Feb 1998 03:00:00 GMT  
 Delphi TCP/IP on WIN NT 3.51

Quote:

>Your reference to "having" to use a TMemo component is confusing. If you
>want to use a TMemo for editing memo data but not have it directly con-
>nected to the underlying field, the TMemo can be used for this. Copying
>memo data between the TMemo and the memo field is very simple, and can be
>accomplished with a single command line. For example, if a TMemoField
>component was created with the Fields Editor, here is the command to copy
>the memo data from the TMemo to the memo field:
>  Table1Notes.Assign(Memo1.Lines);
>To go the other way:
>  Memo1.Lines.Assign(Table1Notes);
>If no TMemoField component was created, you can typecast the return value
>from the Fields property or the FieldByName method (both return a value
>of type TFields) as a TMemoField:
>  TMemoField(Table1.FieldByName('Notes')).Assign(Memo1.Lines);
>--
>_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
>_/ Steve Koterski               _/   The opinions expressed here are    _/

>_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

I am following this thread with great interest because I, too, have
had trouble dealing with memo fields in my Delphi apps.  The
assignment between a TMemoField and TMemo.Lines as you listed is no
problem for me and I have used it in several occasions.  However:

1.  When a record is being edited (or inserted) and before the changes
are posted, all the data field components (TIntegerField etc.) will
have their isNull property correspond to the unposted (yet) user
updates EXCEPT for the TMemoFields.  In order to detect whether there
are stuff in the memo fields before posting I will have to check the
DBMemo Components which are supposedly tied to the same fields as the
TMemoFields.  Once discovered this I can finally do what I wanted but
the price is I cannot put all the field entry detection logic in one
loop:
                for i := 0 to fieldList.count -1 do
                        if not(myTable.Fields[i].isNull) then
                        begin.....{Create special records for each field that has stuff}
                        end;
but have to add something like this:
                for i:=0 to fieldList.count-1 do
                        if (myTable.Fields[i].DataType = ftMemo) then
                                if myTable.Fields[i].FieldName = 'Comment_1' then
                                        {Check if there are stuff in DBMemoComment_1}
                                else if myTable.Fields[i].FieldName = 'Comment_2' then
                                        {Check if there are stuff in DBMemoComment_2}
                                                .....
                        else {Other fields than memo}
                                if not(myTable.Fields[i].isNull) then
                                begin
                                end;

2.  All other TField sub-classes have their isString and Text
properties properly converted and formatted but TMemoField will always
display 'Memo', which is annoying.  There are no properties or methods
for the TMemoField to reveal the content or size of the actual memo.
One has to bring in a TMemo or by using a TDBMemo to take a peek into
a TMemoField's contents.  Even a property for looking at the first 256
characters of the memo content will be very helpful.

3.  Here is something for all TField subclasses:  Why is there not a
'Modified' property of type Boolean, ye {*filter*} children of TField,
like unto the TDataset big brothers?

My 2 cents worth.

William



Thu, 12 Feb 1998 03:00:00 GMT  
 Delphi TCP/IP on WIN NT 3.51
A few days ago I asked if anybody knew of a way, to copy TMemoField in
one database to a TMemoField in a 2nd database, or to append to a 3rd
database.  With much fiddling, cursing, and generally having fun I have
found a way.  It seems very round about to me, but it is working.  I
tried the stream methods but couldn't get them to do job (didn't work
with Assign either).  Anyway, if anybody is interested I can either post
the method to the group, or E-Mail direct. Please let me know.


Sat, 14 Feb 1998 03:00:00 GMT  
 Delphi TCP/IP on WIN NT 3.51

Quote:
>A few days ago I asked if anybody knew of a way, to copy TMemoField in
>one database to a TMemoField in a 2nd database, or to append  

..
Anyway, if anybody is interested I can either post

Quote:
>the method to the group, or E-Mail direct. Please let me know.

Yes, please post...


Sun, 15 Feb 1998 03:00:00 GMT  
 
 [ 16 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Help getting Interbase to work on a web server (D2 Dev/Win NT 3.51/IIS 3.0)

2. Delphi 2.0 with Windows NT 3.51 -- Should I go For it

3. Delphi 2.0 crashing Windows NT 3.51

4. Help with Delphi 3, NT 3.51 and COMCTL32.DLL

5. TCP/IP PING using Novell TCP/IP stack

6. printing (writeln) with win95 vs NT 3.51 (Delphi Bug, or Programmer Ignorance)

7. Will Delphi Run On Alpha with NT 3.51?

8. Local Interbace ODBC driver woes on NT 3.51

9. ChDir under Windows NT 3.51

10. 16 bit TStoredProc and NT 3.51

11. IB problems with NT 3.51

12. Running IB Server Manager on NT 3.51 Server

 

 
Powered by phpBB® Forum Software