Hi,
I was looking through the FCL code and noticed that there seems to be
more than one HTTP server component. What is the difference between
them, and which one would be the better option as the basis for a HTTP
based n-tier application server (for use with tiOPF).
I found the recent one Michael
In our previous episode, Graeme Geldenhuys said:
> > designtime that went away if you manually added a tidbinding in formcreate.
>
> I'm not using design-time usage at all, everything is done manually via code.
> I'm creating a TIdHTTPServer instance via code, set the port, one
> basic event handl
On 22/10/2011, Marco van de Voort wrote:
>
> I haven't tried for years, but I can remember some strange problems
> designtime that went away if you manually added a tidbinding in formcreate.
I'm not using design-time usage at all, everything is done manually via code.
I'm creating a TIdHTTPServer
On Sat, Oct 22, 2011 at 9:38 PM, Ludo Brands wrote:
> Nextval takes a regclass as parameter, not an identifier (column). So, use
> single quotes: SELECT nextval('GameSession_SessionId_seq') as res;
But Postgres requires double quotes or else it will lowercase the
entire identifier and it won't ma
> Error: Preparation of query failed. (PostgreSQL: ERROR:
> column "GameSession_SessionId_seq" does not exist LINE 1:
> prepare prepst2 as SELECT nextval("GameSession_SessionId_se...
>
> SQLGameSession.SQL.Text:='SELECT
> nextval("GameSession_SessionId_seq") as res;';
Nextval takes a regc
In our previous episode, Graeme Geldenhuys said:
> Is anybody here using the Indy 10 components with FPC? More
> specifically, the HTTP Server component. My project compiles fine, but
> when I activate the HTTP Server I get the following error.
>
> "Socket error # 98. Address already in use."
>
>
On Sat, Oct 22, 2011 at 5:42 PM, Michael Van Canneyt
wrote:
> Just a use a TSQLQuery:
Are you sure that it is really like that? My code is virtually the
same as yours and I already checked everything I could come up with.
Using the final "as res;" or not, checked that the sequence exists in
the d
Hi,
Is anybody here using the Indy 10 components with FPC? More
specifically, the HTTP Server component. My project compiles fine, but
when I activate the HTTP Server I get the following error.
"Socket error # 98. Address already in use."
I know that under Linux, if you use a port < 1024 you mus
On 22/10/2011, Felipe Monteiro de Carvalho wrote:
>
> Yet another chapter of my database problems =)
As this message thread proves, there are many issues with Auto-inc
field, so simply DON'T USE THEM!
You have many alternatives, which will save you LOTS of grey hairs.
Auto-Inc field are just evi
Ok, thanks a lot =)
On 10/22/11, Michael Van Canneyt wrote:
> ... And mainly the reason I think it is not abstractable... :-)
In this case I would suggest to abstract it like this:
// ASequenceName -> The name of the sequence for usage in Postgres,
etc. Ignored for MSSQL, etc.
// ARecordValues
On Saturday 22 October 2011 17.33:11 Felipe Monteiro de Carvalho wrote:
> ugh, any ideas how I can obtain the next sequence value using sqldb
> and postgres then?
>
> I have never used sequence values before, and while I am googling I
> only found either answers which are specific for a particular
On Sat, Oct 22, 2011 at 1:53 PM, Martin Schreiber wrote:
> On Saturday 22 October 2011 17.23:38 Marcos Douglas wrote:
>> On Sat, Oct 22, 2011 at 11:21 AM, wrote:
>> >> DBComm.SQLTransaction.StartTransaction; <-- Fails here with
>> >> "transaction already active"
>> >
>> > Correct. The default t
On Saturday 22 October 2011 17.23:38 Marcos Douglas wrote:
> On Sat, Oct 22, 2011 at 11:21 AM, wrote:
> >> DBComm.SQLTransaction.StartTransaction; <-- Fails here with
> >> "transaction already active"
> >
> > Correct. The default transaction is made active after connecting.
> > You should call
On Sat, 22 Oct 2011, Ludo Brands wrote:
Afaik Zeos manages to abstract this for all these dbs by having a
sequence object.
I fail to see how it can do that. E.g. the mechanism by
Martin is just a trick to update
a field value after an insert/update. That's a fine/useful
mechanism, but not wh
On Sat, 22 Oct 2011, Felipe Monteiro de Carvalho wrote:
ugh, any ideas how I can obtain the next sequence value using sqldb
and postgres then?
I have never used sequence values before, and while I am googling I
only found either answers which are specific for a particular
framework (java, dja
On Sat, Oct 22, 2011 at 1:33 PM, Felipe Monteiro de Carvalho
wrote:
> ugh, any ideas how I can obtain the next sequence value using sqldb
> and postgres then?
>
> I have never used sequence values before, and while I am googling I
> only found either answers which are specific for a particular
> f
ugh, any ideas how I can obtain the next sequence value using sqldb
and postgres then?
I have never used sequence values before, and while I am googling I
only found either answers which are specific for a particular
framework (java, djambo, whatever) or people claiming that it should
generate the
On Sat, Oct 22, 2011 at 11:35 AM, Inoussa OUEDRAOGO wrote:
>> Ok, searching some more I see that "select scope_identity()" could
>> return the generated primary key. But how to get the value?
>
> Better use the RETURNING* clause** as it clearly state the column
> value you are expecting; The "scop
On Sat, Oct 22, 2011 at 11:21 AM, wrote:
>
>>
>> DBComm.SQLTransaction.StartTransaction; <-- Fails here with
>> "transaction already active"
>
> Correct. The default transaction is made active after connecting.
> You should call StartTransaction on this transaction only after a commit or
> rollb
> > Afaik Zeos manages to abstract this for all these dbs by having a
> > sequence object.
>
> I fail to see how it can do that. E.g. the mechanism by
> Martin is just a trick to update
> a field value after an insert/update. That's a fine/useful
> mechanism, but not what I'd call
> 'abstract
On Sat, 22 Oct 2011, Martin Schreiber wrote:
On Saturday 22 October 2011 16.20:13 Michael Van Canneyt wrote:
Note that I did not invest this stuff ... I just copied from stuff to
create other tables which were already in the project.
You must get a value first, and pass it along to the ins
On Sat, 22 Oct 2011, Marco van de Voort wrote:
In our previous episode, michael.vancann...@wisa.be said:
Ok, now I want to insert a record in my table and I would like to
obtain the auto-generated PrimaryKey
This is a classic problem, since SQL simply doesn't support this.
So all DBs do so
On Saturday 22 October 2011 16.20:13 Michael Van Canneyt wrote:
> >
> > Note that I did not invest this stuff ... I just copied from stuff to
> > create other tables which were already in the project.
>
> You must get a value first, and pass it along to the insert statement.
>
> Auto-generation
In our previous episode, michael.vancann...@wisa.be said:
> >> Ok, now I want to insert a record in my table and I would like to
> >> obtain the auto-generated PrimaryKey
> >
> > This is a classic problem, since SQL simply doesn't support this.
> >
> > So all DBs do something else, for postgresql t
On Sat, 22 Oct 2011, Felipe Monteiro de Carvalho wrote:
On Sat, Oct 22, 2011 at 3:33 PM, wrote:
2. or sequences, which must be generated manually before the insert (DB2,
Oracle, Firebird) using a special
API, but which may or may not be generated in an AFTER INSERT trigger.
In which cas
On Sat, Oct 22, 2011 at 3:33 PM, wrote:
> 2. or sequences, which must be generated manually before the insert (DB2,
> Oracle, Firebird) using a special
> API, but which may or may not be generated in an AFTER INSERT trigger.
> In which case it's impossible to retrieve the sequence value after
On Sat, 22 Oct 2011, Martin Schreiber wrote:
On Saturday 22 October 2011 15.21:40 Marco van de Voort wrote:
In our previous episode, Felipe Monteiro de Carvalho said:
Ok, now I want to insert a record in my table and I would like to
obtain the auto-generated PrimaryKey
This is a classic pr
On Saturday 22 October 2011 15.21:40 Marco van de Voort wrote:
> In our previous episode, Felipe Monteiro de Carvalho said:
> > Ok, now I want to insert a record in my table and I would like to
> > obtain the auto-generated PrimaryKey
>
> This is a classic problem, since SQL simply doesn't support
> Ok, searching some more I see that "select scope_identity()" could
> return the generated primary key. But how to get the value?
Better use the RETURNING* clause** as it clearly state the column
value you are expecting; The "scope_identity()" may be a source of
subtle bugs that are
difficult to
On Sat, 22 Oct 2011, Felipe Monteiro de Carvalho wrote:
Hello,
Ok, searching some more I see that "select scope_identity()" could
return the generated primary key. But how to get the value?
DBComm.PQConnection.ExecuteDirect(SQLText);
The method above has no return value =(
Use a TSQLQuer
On Sat, 22 Oct 2011, Marco van de Voort wrote:
In our previous episode, Felipe Monteiro de Carvalho said:
Ok, now I want to insert a record in my table and I would like to
obtain the auto-generated PrimaryKey
This is a classic problem, since SQL simply doesn't support this.
So all DBs do s
In our previous episode, Felipe Monteiro de Carvalho said:
> Ok, now I want to insert a record in my table and I would like to
> obtain the auto-generated PrimaryKey
This is a classic problem, since SQL simply doesn't support this.
So all DBs do something else, for postgresql there are sequence o
On Sat, 22 Oct 2011, Felipe Monteiro de Carvalho wrote:
Hello,
Yet another chapter of my database problems =)
Ok, now I want to insert a record in my table and I would like to
obtain the auto-generated PrimaryKey
I tryed a number of options:
SQLGameSession.Insert();
SQLGameSession.Edit;
Hello,
Ok, searching some more I see that "select scope_identity()" could
return the generated primary key. But how to get the value?
DBComm.PQConnection.ExecuteDirect(SQLText);
The method above has no return value =(
--
Felipe Monteiro de Carvalho
Hello,
Yet another chapter of my database problems =)
Ok, now I want to insert a record in my table and I would like to
obtain the auto-generated PrimaryKey
I tryed a number of options:
SQLGameSession.Insert();
SQLGameSession.Edit;
SQLGameSession.FieldByName('GameEvent').AsInteger := lGam
In our previous episode, Felipe Monteiro de Carvalho said:
> Nil is not a routine, it is a value, it means that the object is
> empty, it does not exist / is not allocated. Nil in existing
> implementations that I know is represented by the value zero.
Look better in, euh, Free Pascal, and see wha
Felipe Monteiro de Carvalho wrote:
Free is how you release the memory allocated for a object. Free calls
Destroy. Never call Destroy manually. When you implement the
destructor you always implement Destroy, never change Free.
A number of years ago, Matthew Jones's wife looked over his shoulder
2011/10/22 Gregory M. Turner
>
> Taking these terms in the broadest sense possible, wouldn't we say that OOP
> is mostly a functional development paradigm?
>
> Not a rhetorical question, I seriously am not sure.
>
> OP's somewhat idiosyncratic requirement to put all the OOP metadata in a
> separat
On Sat, Oct 22, 2011 at 9:36 AM, Frank Church wrote:
> Does that mean that Free itself reclaims the memory used by the object's
> fields and properties but does not release the memory used by the TObject or
> pointer itself, where as setting it to nil or executing Destroy does, or
> does Destroy d
Does that mean that Free itself reclaims the memory used by the object's
fields and properties but does not release the memory used by the TObject or
pointer itself, where as setting it to nil or executing Destroy does, or
does Destroy do something different?
All memory is released includi
Am 22.10.2011 um 09:08 schrieb Frank Church:
>
>
> On 22 October 2011 07:20, Felipe Monteiro de Carvalho
> wrote:
> I understand Assigned as being the same as <> nil, so Assigned(Object)
> = Object <> nil
>
> I vaguely remember that it could be safer in some corner case, but I
> don't rememb
Hello,
Instead of .Free in your FreeVars routine, you should use FreeAndNil(
theobject).
The correct lifecycle for class objects is :
var
anObject : TMyObject;
begin
anObject := nil; //not needed for class attributes. Required for local
function or global unit variables.
anObject := TMyObj
On 22 October 2011 08:14, Ludo Brands wrote:
> > Nil is not a routine, it is a value, it means that the object
> > is empty, it does not exist / is not allocated. Nil in
> > existing implementations that I know is represented by the value zero.
> >
> > The typical life-cycle of a object is:
> >
>
When the loop runs again Assigned in InitVars is false so as soon as those
FBreakStrings and SCStrings are accessed within the loop a SIGSEGV occurs.
So what I want to know is whether Assigned remains true when Free is
executed.
See my previous answer.
There is a helper function "procedu
> Nil is not a routine, it is a value, it means that the object
> is empty, it does not exist / is not allocated. Nil in
> existing implementations that I know is represented by the value zero.
>
> The typical life-cycle of a object is:
>
> MyObject := TMyObject.Create;
> try
> MyObject.DoSom
On 22 October 2011 07:20, Felipe Monteiro de Carvalho <
felipemonteiro.carva...@gmail.com> wrote:
> I understand Assigned as being the same as <> nil, so Assigned(Object)
> = Object <> nil
>
> I vaguely remember that it could be safer in some corner case, but I
> don't remember ever meting that.
>
46 matches
Mail list logo