Re: [fpc-pascal] Looking for a Firebird book?

2008-04-11 Thread Tom York
On Wed, Apr 9, 2008 at 5:53 AM, Codebue Fabio - P-Soft [EMAIL PROTECTED]
wrote:

 Take a look to a new Firebird 2.1 next month and probably you will change
 your idea about it...
 UDF: FreeAdHocUDF, a lot of internal SQL function...
 and if you wanna a good book www.ibphoenix.com Helen Borrie book... a
 MUST!


Will 2.1 have a true auto increment attribute?  A boolean field perhaps?
Those are the only things that I miss when using FB.  I am aware that all of
these issues can be resolved by using generators/triggers and a validating
domain.  That is what I like about MySQL, MSSQL and others that are missing
from FB.

Do not misunderstand though.  I've used FB for 8+ years with great success
in embedded, small and large transactional systems without flaw.  Never had
a corrupt DB.  AFAIK, never had a corrupt backup.  Most of the time, I
deploy FB on Linux servers and backup using gbak.

Tom
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] USB Printers

2007-07-10 Thread Tom York
Since you specify LPT1:, I assume you are using Windows.  Obviously the 
solution for Linux would be different than Windows.  I am not quite sure 
about FPC, but in Delphi you basically have two choices.


1) Capture the USB printer to an LPT port, then attempt assign(printer, 
'LPTx:');  (not a good solution in my opinion).


2) Open the Windows printer in RAW mode.  I've used this style of 
printing to a Eltron USB thermal printer and it worked well.  The 
procedure below is quite similar to the one I used.


Please write back and let me know if this routine works.

(Begin Procedure -- From Delphi newsgroups)
uses WinSpool;

procedure WriteRawStringToPrinter(PrinterName: String; S: String);
var
  Handle: THandle;
  N: DWORD;
  DocInfo1: TDocInfo1;
begin
  if not OpenPrinter(PChar(PrinterName), Handle, nil) then
begin
 ShowMessage('error ' + IntToStr(GetLastError));
 Exit;
end;
  with DocInfo1 do begin
pDocName := PChar('test doc');
pOutputFile := nil;
pDataType := 'RAW';

  end;
  StartDocPrinter(Handle, 1, @DocInfo1);
  StartPagePrinter(Handle);
  WritePrinter(Handle, PChar(S), Length(S), N);
  EndPagePrinter(Handle);
  EndDocPrinter(Handle);
  ClosePrinter(Handle);
end;
(End Procedure)

Tom




Roberto Gonçalves Barreiro wrote:

I'm a delphi programmer.
I'm printing a report using:
assign(wPrinter,'Lpt1:')
and it goes ok in paralel priner.
I did assign(wPrinter,'USB001') and it did not work.
Do you know how to print in USB printers?
I thanks a lot if you can help me.
 

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] USB Printers

2007-07-10 Thread Tom York
Disregard my prior post.  It does not work unless the Windows Spooler 
API is converted.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] USB Printers

2007-07-10 Thread Tom York
Disregard my prior post.  It does not work unless the Windows Spooler 
API is converted.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] USB Printers

2007-07-10 Thread Tom York

Disregard my prior post, it is Delphi specific.  I did find this one.

(http://www.freepascal.org/cgi-bin/viewcvs.cgi/trunk/components/printers/samples/rawmode/unitmain.pas?root=lazarusrev=10129view=markup)

procedure WritePrinter;
var
 sTemp: String;
 Written: Integer;
begin
 Written := 0;
 sTemp := 'Test String';
 Printer.Title := Caption;
 Printer.RawMode := True;
 Printer.BeginDoc;
 Printer.Write(sTemp[1], Length(sTemp), Written);
 Printer.EndDoc;
end;



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] USB Printers

2007-07-10 Thread Tom York
Sorry for all of these replies, I think my ISP (webhost) is working on 
their mail servers.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] How do I join the Lazarus list?

2007-07-03 Thread Tom York

I cannot seem to find a way to join the mailing list.

TIA,
Tom
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Interesting namespace question

2007-06-21 Thread Tom York

Hi!  New list member here...

 I saw an interesting bug on C++, and I was wondering how to solve this
 type of bug in Pascal:

This is easily resolved.

Try this version:
{$MODE OBJFPC}
program namespace_test;

function test : boolean;
begin
writeln('public function test called.');
result := true;
end;

type
TTest = class
   function test : boolean;
end;

function TTest.test : boolean;
begin
writeln('method TTest.test called.');
result := test;
end;

var
c_test : TTest;

begin
c_test := TTest.create;
try
  writeln (c_test.test); // calls the class method
  writeln (namespace_test.test); // calls the public function
finally
  c_test.free;
end;
end.


Tom
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Starting new threads

2007-06-21 Thread Tom York


When you want to start a new thread, please create a new mail, instead 
of replying to a another message and changing the subject. The latter 
method messes up automatic threading in most email clients, because 
there are other email headers apart from the subject which indicate to 
which thread an email belongs (and this header is wrong if you reply).
I assume that is directed at me. :)  My apologies.  I was attempting to 
respond to Interesting namespace question, but I was not a member of 
the list yet, so I attempted to duplicate the subject.  I should have 
known better.


Tom
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Starting new threads

2007-06-21 Thread Tom York
By the way is NNTP forbidden?  I would much rather use NNTP over a 
mailing list.


Thanks,
Tom

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal