Re: [Lazarus] Editing a TDBf record
That's great, thank you Luiz: works a treat! TDbf is such a nice lightweight solution for incorporating database functionality into monolithic applications and it's still relevant even though it appears that development stopped years ago. 2008/11/30 Luiz Americo Pereira Camara <[EMAIL PROTECTED]>: > Dave Coventry escreveu: >> Does anyone have experience of TDbf? >> >> I want to change an existing record: >> >> ival:=strtoint(ConFigs.Values['hubID']); >> Dbf1.Open; >> while not(Dbf1.EOF)do >> begin >> if Dbf1.FieldByName('hubID').AsInteger=ival then >> begin >> > Add "Dbf1.Edit;" here >>Dbf1.FieldByName('Loc').AsString:=Configs.Values['Location']; >>Dbf1.FieldByName('EstName').AsString:=Configs.Values['Establishment']; >>Dbf1.FieldByName('NetwkName').AsString:=NetwkName; >>Dbf1.FieldByName('VATNo').AsString:=Configs.Values['VATNumber']; >>Dbf1.FieldByName('TelNo').AsString:=Configs.Values['TelNumber']; >>Dbf1.FieldByName('User').AsString:=username; >>Dbf1.Post; >> end; >> Dbf1.Next; >> end; >> >> Obviously ival has the value of the 'hubID' field of the record that I >> want to update and I'd like to replace all the fields in the record >> with new values. >> >> However, I'm getting an error which says: "Project raised exception >> class 'Unknown' " >> ___ >> Lazarus mailing list >> Lazarus@lazarus.freepascal.org >> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus >> >> >> > > ___ > Lazarus mailing list > Lazarus@lazarus.freepascal.org > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus > ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Editing a TDBf record
Dave Coventry escreveu: > Does anyone have experience of TDbf? > > I want to change an existing record: > > ival:=strtoint(ConFigs.Values['hubID']); > Dbf1.Open; > while not(Dbf1.EOF)do > begin > if Dbf1.FieldByName('hubID').AsInteger=ival then > begin > Add "Dbf1.Edit;" here >Dbf1.FieldByName('Loc').AsString:=Configs.Values['Location']; >Dbf1.FieldByName('EstName').AsString:=Configs.Values['Establishment']; >Dbf1.FieldByName('NetwkName').AsString:=NetwkName; >Dbf1.FieldByName('VATNo').AsString:=Configs.Values['VATNumber']; >Dbf1.FieldByName('TelNo').AsString:=Configs.Values['TelNumber']; >Dbf1.FieldByName('User').AsString:=username; >Dbf1.Post; > end; > Dbf1.Next; > end; > > Obviously ival has the value of the 'hubID' field of the record that I > want to update and I'd like to replace all the fields in the record > with new values. > > However, I'm getting an error which says: "Project raised exception > class 'Unknown' " > ___ > Lazarus mailing list > Lazarus@lazarus.freepascal.org > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus > > > ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Editing a TDBf record
Does anyone have experience of TDbf? I want to change an existing record: ival:=strtoint(ConFigs.Values['hubID']); Dbf1.Open; while not(Dbf1.EOF)do begin if Dbf1.FieldByName('hubID').AsInteger=ival then begin Dbf1.FieldByName('Loc').AsString:=Configs.Values['Location']; Dbf1.FieldByName('EstName').AsString:=Configs.Values['Establishment']; Dbf1.FieldByName('NetwkName').AsString:=NetwkName; Dbf1.FieldByName('VATNo').AsString:=Configs.Values['VATNumber']; Dbf1.FieldByName('TelNo').AsString:=Configs.Values['TelNumber']; Dbf1.FieldByName('User').AsString:=username; Dbf1.Post; end; Dbf1.Next; end; Obviously ival has the value of the 'hubID' field of the record that I want to update and I'd like to replace all the fields in the record with new values. However, I'm getting an error which says: "Project raised exception class 'Unknown' " ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] [joke] Explanation about the Lazarus logo
2008/11/29 svaa <[EMAIL PROTECTED]>: > What's that animal? > > It's not a cheetah or a cat. I think it could be some kind of feline > baby, perhaps a baby lynx. it's probably a leopard cub, not a cheetah. henry ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] [joke] Explanation about the Lazarus logo
What's that animal? It's not a cheetah or a cat. I think it could be some kind of feline baby, perhaps a baby lynx. Damien Gerard escribió: > http://cdn.ugoto.com/pictures/the_end_of_the_chase-53b.jpg > > Sorry I found it funny :) > > > -- > Damien Gerard > [EMAIL PROTECTED] > > La raison de la bouffe est toujours la meilleure. > > > > > > > > > > ___ > Lazarus mailing list > Lazarus@lazarus.freepascal.org > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus > ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Finding out the Hostname of the Computer.
Malcolm Poole wrote: > Aleš Katona wrote: >> If you want the value of $HOSTNAME, use unit SysUtils and >> GetEnvironmentVariable('HOSTNAME'); >> > Hmm. This was the first thing that I tried. For some reason I get an > empty string on my system (Ubuntu Gutsy). That's why I dug around and > found the GetHostName function. > > Any idea why GetEnvironmentVariable('HOSTNAME') doesn't work for me? > 'echo $HOSTNAME' on the commandline works as expected. Check it's been exported, i.e. processes forked by the shell simply might not be getting a copy. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Linking to an arbitrary DLL (libusb-win32)
Sergei Gorelkin wrote: > Having faced with the same problem in the meantime, I deleted the > {$linklib } directive and added library and name to all function > definitions, so your example would look like > > procedure usb_set_debug(level: longint);cdecl;external libname name > 'usb_set_debug'; > > The libname constant has to be defined differently for Windows and Linux: > > const > {$IFDEF MSWINDOWS} >libname = 'libusb0.dll'; > {$ELSE} >libname = 'libusb.so'; > {$ENDIF} > > Another caveat with libusb-win32 is that LIBUSB_PATH_MAX constant should > be different from the Linux one: > > {$IFDEF MSWINDOWS} > const LIBUSB_PATH_MAX = 512; > {$ENDIF} > {$IFDEF LINUX} > const LIBUSB_PATH_MAX = 4097; > {$ENDIF} Thanks Sergei, I'll investigate. I've also come across a toolset called usbio which is expensive but available for a limited-time evaluation (four hours per session) and apparently includes Delphi support. I'm not expecting to get very far, but I'm interested to see just how much functionality the Edgeport stuff grafts onto NT4. http://www.thesycon.de/eng/usbio_demo.shtml http://www.digi.com/support/productdetl.jsp?pid=2628&osvid=55&tp=1&s=0 -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Ping Graeme
On Fri, Nov 28, 2008 at 7:02 PM, "Leonardo M. Ramé" <[EMAIL PROTECTED]> wrote: > > To refresh your mind, the project I'm talking about is part of this: > http://www.paranoia.clara.net/mozilla_delphi_project.html and > specifically this: https://www.mozdev.org/bugs/show_bug.cgi?id=8708 > > My question is, have you created a mozilla plugin compilable with > FreePascal? No, my project wasn't to create mozilla plugins. It was to enabled mozilla plugins to run outside mozilla, but in a Delphi/Lazarus program. We needed to have a cross-platform Flash component running inside our applications. Like an embedded ActiveX flash component in Delphi - for for Linux and Windows platforms. This is what I created, but I was pulled off the project, because we decided to implement a CGI application instead and simply use a web browser to run that section of our program. http://opensoft.homeip.net/wiki/wiki.cgi?p=mozilla-plugin-panel I haven't completed the project, but the last time (some three years back) I managed to get Flash and Acrobat browser plugin embedded in a Lazarus application. Linux support was not working yet. Source code is available on SourceForge. Hopefully some day I'll have the time to complete that project. It has the potential to run any mozilla plugin inside a GUI application, which will be very cool. :-) Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus