Re: [fpc-pascal] Casting UTF8String, WideString and UnicodeString into AnsiString and vice versa

2012-12-03 Thread Jonas Maebe
On 03 Dec 2012, at 20:01, ik wrote: > On Mon, Dec 3, 2012 at 7:31 PM, Jonas Maebe wrote: >> >> On 03 Dec 2012, at 18:12, ik wrote: >> >>> I made casting of UTF8String, WideString and UnicodeString to AnsiString: >>> https://github.com/ik5/fp-msgpack/blob/master/src/msgpack.pas#L452 >>> >>> As

Re: [fpc-pascal] Casting UTF8String, WideString and UnicodeString into AnsiString and vice versa

2012-12-03 Thread ik
On Mon, Dec 3, 2012 at 7:31 PM, Jonas Maebe wrote: > > On 03 Dec 2012, at 18:12, ik wrote: > >> I made casting of UTF8String, WideString and UnicodeString to AnsiString: >> https://github.com/ik5/fp-msgpack/blob/master/src/msgpack.pas#L452 >> >> As an example. >> >> My tests works. but are there t

Re: [fpc-pascal] Coping a DataSet

2012-12-03 Thread Marcos Douglas
On Mon, Dec 3, 2012 at 2:56 PM, silvioprog wrote: > > 2012/12/3 Marcos Douglas >> >> On Mon, Dec 3, 2012 at 2:32 PM, Michael Van Canneyt >> wrote: >> > >> > >> > On Mon, 3 Dec 2012, Marcos Douglas wrote: >> > >> >> On Mon, Dec 3, 2012 at 2:03 PM, wrote: >> >>> >> >>> >> >>> >> >>> On Mon, 3 De

Re: [fpc-pascal] Coping a DataSet

2012-12-03 Thread silvioprog
dbExpress, IBQuery or Zeos implements it? 2012/12/3 Marcos Douglas > On Mon, Dec 3, 2012 at 2:32 PM, Michael Van Canneyt > wrote: > > > > > > On Mon, 3 Dec 2012, Marcos Douglas wrote: > > > >> On Mon, Dec 3, 2012 at 2:03 PM, wrote: > >>> > >>> > >>> > >>> On Mon, 3 Dec 2012, silvioprog wrote

Re: [fpc-pascal] Coping a DataSet

2012-12-03 Thread Marcos Douglas
On Mon, Dec 3, 2012 at 2:32 PM, Michael Van Canneyt wrote: > > > On Mon, 3 Dec 2012, Marcos Douglas wrote: > >> On Mon, Dec 3, 2012 at 2:03 PM, wrote: >>> >>> >>> >>> On Mon, 3 Dec 2012, silvioprog wrote: >>> Guys, Is "Assign" method implemented for dataset in FPC? >>> >>> >>> >>>

Re: [fpc-pascal] Coping a DataSet

2012-12-03 Thread Michael Van Canneyt
On Mon, 3 Dec 2012, Marcos Douglas wrote: On Mon, Dec 3, 2012 at 2:03 PM, wrote: On Mon, 3 Dec 2012, silvioprog wrote: Guys, Is "Assign" method implemented for dataset in FPC? No, it is not. Datasets differ wildly in how they access and store data. Michael. But all descendents us

Re: [fpc-pascal] Casting UTF8String, WideString and UnicodeString into AnsiString and vice versa

2012-12-03 Thread Jonas Maebe
On 03 Dec 2012, at 18:12, ik wrote: > I made casting of UTF8String, WideString and UnicodeString to AnsiString: > https://github.com/ik5/fp-msgpack/blob/master/src/msgpack.pas#L452 > > As an example. > > My tests works. but are there things/contents that can break this > casting, or change the

[fpc-pascal] Casting UTF8String, WideString and UnicodeString into AnsiString and vice versa

2012-12-03 Thread ik
Hello, I made casting of UTF8String, WideString and UnicodeString to AnsiString: https://github.com/ik5/fp-msgpack/blob/master/src/msgpack.pas#L452 As an example. My tests works. but are there things/contents that can break this casting, or change the content itself in some way ? Thanks, Ido __

Re: [fpc-pascal] Coping a DataSet

2012-12-03 Thread Marcos Douglas
On Mon, Dec 3, 2012 at 2:03 PM, wrote: > > > On Mon, 3 Dec 2012, silvioprog wrote: > >> Guys, >> >> Is "Assign" method implemented for dataset in FPC? > > > No, it is not. Datasets differ wildly in how they access and store data. > > Michael. But all descendents use TFieds classes so, why not? I

Re: [fpc-pascal] Coping a DataSet

2012-12-03 Thread michael . vancanneyt
On Mon, 3 Dec 2012, silvioprog wrote: Guys, Is "Assign" method implemented for dataset in FPC? No, it is not. Datasets differ wildly in how they access and store data. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://

Re: [fpc-pascal] Coping a DataSet

2012-12-03 Thread silvioprog
Guys, Is "Assign" method implemented for dataset in FPC? 2012/12/3 Marcos Douglas > Hi, > > What is the faster way to copy a DataSet to another? > The FPC provides some functionality for this? > > Thanks, > Marcos Douglas -- Silvio Clécio My public projects - github.com/silvioprog __

Re: [fpc-pascal] Oracle driving me crazy - please provide dried frog pills[1]

2012-12-03 Thread Reinier Olislagers
On 3-12-2012 17:47, Reinier Olislagers wrote: > On 3-12-2012 17:17, Tomas Hajny wrote: >> I don't know what you're doing wrong, but I'd try excluding the semicolon. >> > Thanks, Tomas, did that already - no effect. > Oops - blast - had used old .exe version & forgot to copy newly compiled version

Re: [fpc-pascal] length for long ansistring = segment fault

2012-12-03 Thread ik
On Mon, Dec 3, 2012 at 1:00 PM, Michael Van Canneyt wrote: > > > On Mon, 3 Dec 2012, Jonas Maebe wrote: > >> >> On 03 Dec 2012, at 11:52, Michael Van Canneyt wrote: >> >>> On Mon, 3 Dec 2012, Jonas Maebe wrote: >>> On 03 Dec 2012, at 11:13, Michael Van Canneyt wrote: > You are overwr

[fpc-pascal] Coping a DataSet

2012-12-03 Thread Marcos Douglas
Hi, What is the faster way to copy a DataSet to another? The FPC provides some functionality for this? Thanks, Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Oracle driving me crazy - please provide dried frog pills[1]

2012-12-03 Thread Reinier Olislagers
On 3-12-2012 17:17, Tomas Hajny wrote: > On Mon, December 3, 2012 16:44, Reinier Olislagers wrote: >> Been fiddling with the Oracle connector. >> >> This: >> using the scott schema on Oracle 10g, this works fine in my JDBC query >> GUI and in sql*plus: >> select * from scott.emp where JOB='CLERK';

Re: [fpc-pascal] Oracle driving me crazy - please provide dried frog pills[1]

2012-12-03 Thread Ludo Brands
On 03/12/2012 16:44, Reinier Olislagers wrote: Been fiddling with the Oracle connector. This: using the scott schema on Oracle 10g, this works fine in my JDBC query GUI and in sql*plus: select * from scott.emp where JOB='CLERK'; However, in code (FPC trunk x86, Windows), this: Q.SQL.Text:='sele

Re: [fpc-pascal] Oracle driving me crazy - please provide dried frog pills[1]

2012-12-03 Thread Tomas Hajny
On Mon, December 3, 2012 16:44, Reinier Olislagers wrote: > Been fiddling with the Oracle connector. > > This: > using the scott schema on Oracle 10g, this works fine in my JDBC query > GUI and in sql*plus: > select * from scott.emp where JOB='CLERK'; > > However, in code (FPC trunk x86, Windows),

[fpc-pascal] Oracle driving me crazy - please provide dried frog pills[1]

2012-12-03 Thread Reinier Olislagers
Been fiddling with the Oracle connector. This: using the scott schema on Oracle 10g, this works fine in my JDBC query GUI and in sql*plus: select * from scott.emp where JOB='CLERK'; However, in code (FPC trunk x86, Windows), this: Q.SQL.Text:='select * from EMP WHERE JOB=''CLERK'';'; gives ORA-00

Re: [fpc-pascal] length for long ansistring = segment fault

2012-12-03 Thread Michael Van Canneyt
On Mon, 3 Dec 2012, Jonas Maebe wrote: On 03 Dec 2012, at 11:52, Michael Van Canneyt wrote: On Mon, 3 Dec 2012, Jonas Maebe wrote: On 03 Dec 2012, at 11:13, Michael Van Canneyt wrote: You are overwriting the pointer. S is (behind the scenes) a pointer to a memory area. You should do Fil

Re: [fpc-pascal] length for long ansistring = segment fault

2012-12-03 Thread Jonas Maebe
On 03 Dec 2012, at 11:52, Michael Van Canneyt wrote: On Mon, 3 Dec 2012, Jonas Maebe wrote: On 03 Dec 2012, at 11:13, Michael Van Canneyt wrote: You are overwriting the pointer. S is (behind the scenes) a pointer to a memory area. You should do FillChar(s[1], 1024, '*'); Or use http://ww

Re: [fpc-pascal] length for long ansistring = segment fault

2012-12-03 Thread Michael Van Canneyt
On Mon, 3 Dec 2012, Jonas Maebe wrote: On 03 Dec 2012, at 11:13, Michael Van Canneyt wrote: On Mon, 3 Dec 2012, ik wrote: var s : AnsiString; l : word; begin SetLength(s, 1024); FillChar(s, 1024, '*'); You are overwriting the pointer. S is (behind the scenes) a pointer to a memory are

Re: [fpc-pascal] length for long ansistring = segment fault

2012-12-03 Thread Jonas Maebe
On 03 Dec 2012, at 11:13, Michael Van Canneyt wrote: On Mon, 3 Dec 2012, ik wrote: var s : AnsiString; l : word; begin SetLength(s, 1024); FillChar(s, 1024, '*'); You are overwriting the pointer. S is (behind the scenes) a pointer to a memory area. You should do FillChar(s[1], 1024, '*')

Re: [fpc-pascal] length for long ansistring = segment fault

2012-12-03 Thread ik
On Mon, Dec 3, 2012 at 12:13 PM, Michael Van Canneyt wrote: > > > On Mon, 3 Dec 2012, ik wrote: > >> Hello, >> >> When I try to get the length of AnsiString, it returns me segment fault. >> I'm not sure if I'm doing something wrong: >> >> var >> s : AnsiString; >> l : word; >> >> begin >> SetLe

Re: [fpc-pascal] length for long ansistring = segment fault

2012-12-03 Thread Michael Van Canneyt
On Mon, 3 Dec 2012, ik wrote: Hello, When I try to get the length of AnsiString, it returns me segment fault. I'm not sure if I'm doing something wrong: var s : AnsiString; l : word; begin SetLength(s, 1024); FillChar(s, 1024, '*'); You are overwriting the pointer. S is (behind the sc

[fpc-pascal] length for long ansistring = segment fault

2012-12-03 Thread ik
Hello, When I try to get the length of AnsiString, it returns me segment fault. I'm not sure if I'm doing something wrong: var s : AnsiString; l : word; begin SetLength(s, 1024); FillChar(s, 1024, '*'); l := Length(s); // seg fault here writeln(l); end. Am I doing here something wro