Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread how to retrieve information from insert statement?
Thu, May 31 2007 7:52 AMPermanent Link

"Gary Cuthbert"
Hello, don't know if this is possible or not with DBISAM perhaps someone
could clarify.


Is there a way to insert information into a table whereby the inserted
record details can be made available without having to re-query? There was
something is MSSQL (I forget exactly) to achieve this, just wondered if a
similar mechanism exists with DBISAM.

For example the statement 'INSERT INTO "NAVFILE" (DATA_ID, FILEPATH) VALUES
(1, "C:\Temp")' will create a record with an auto- field 'FileID', ideally I
would like this new value to be available within my DBISAMQuery object
following a successful call to ExecSQL with the above statement.

If I need to re-query fair enough...

All comments / suggestions welcomed

Many thanks
Gary

Thu, May 31 2007 11:52 AMPermanent Link

"Donat Hebert \(Worldsoft\)"
Hi Gary, from PDF manual, this snipet provides the overview ...  Donat.

START TRANSACTION;

INSERT INTO customer (company) VALUES ('Test');

INSERT INTO orders (custno,empno) VALUES (LASTAUTOINC('customer'),100);

INSERT INTO orders (custno,empno) VALUES (LASTAUTOINC('customer'),200);

COMMIT FLUSH;



"Gary Cuthbert" <gary.cuthbert@codaoctopus.com> wrote in message =
news:A6DB16BE-E747-439C-B19F-9A8EFE00BD66@news.elevatesoft.com...
> Hello, don't know if this is possible or not with DBISAM perhaps =
someone=20
> could clarify.
>=20
>=20
> Is there a way to insert information into a table whereby the inserted =

> record details can be made available without having to re-query? There =
was=20
> something is MSSQL (I forget exactly) to achieve this, just wondered =
if a=20
> similar mechanism exists with DBISAM.
>=20
> For example the statement 'INSERT INTO "NAVFILE" (DATA_ID, FILEPATH) =
VALUES=20
> (1, "C:\Temp")' will create a record with an auto- field 'FileID', =
ideally I=20
> would like this new value to be available within my DBISAMQuery object =

> following a successful call to ExecSQL with the above statement.
>=20
> If I need to re-query fair enough...
>=20
> All comments / suggestions welcomed
>=20
> Many thanks
> Gary=20
>=20
>
Fri, Jun 1 2007 4:08 PMPermanent Link

"Gary Cuthbert"
Thanks Donat, the old MSSQL transact SQL allowed for the population of =
variables with constants/function such as this, just the ticket. The pdf =
doc does appear to have a slightly richer content than the hlp, I will =
refer to this in future.

Thank you for taking the time to reply.

Gary

 "Donat Hebert (Worldsoft)" <donat.hebert@worldsoft.ca> wrote in =
message =
news:7A733084-5326-4DEF-A8DC-BC5DACC0D070@news.elevatesoft.com...
 Hi Gary, from PDF manual, this snipet provides the overview ...  =
Donat.

 START TRANSACTION;

 INSERT INTO customer (company) VALUES ('Test');

 INSERT INTO orders (custno,empno) VALUES =
(LASTAUTOINC('customer'),100);

 INSERT INTO orders (custno,empno) VALUES =
(LASTAUTOINC('customer'),200);

 COMMIT FLUSH;



 "Gary Cuthbert" <gary.cuthbert@codaoctopus.com> wrote in message =
news:A6DB16BE-E747-439C-B19F-9A8EFE00BD66@news.elevatesoft.com...
 > Hello, don't know if this is possible or not with DBISAM perhaps =
someone=20
 > could clarify.
 >=20
 >=20
 > Is there a way to insert information into a table whereby the =
inserted=20
 > record details can be made available without having to re-query? =
There was=20
 > something is MSSQL (I forget exactly) to achieve this, just wondered =
if a=20
 > similar mechanism exists with DBISAM.
 >=20
 > For example the statement 'INSERT INTO "NAVFILE" (DATA_ID, FILEPATH) =
VALUES=20
 > (1, "C:\Temp")' will create a record with an auto- field 'FileID', =
ideally I=20
 > would like this new value to be available within my DBISAMQuery =
object=20
 > following a successful call to ExecSQL with the above statement.
 >=20
 > If I need to re-query fair enough...
 >=20
 > All comments / suggestions welcomed
 >=20
 > Many thanks
 > Gary=20
 >=20
 >
Mon, Jun 4 2007 2:46 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Gary,

<< Thanks Donat, the old MSSQL transact SQL allowed for the population of
variables with constants/function such as this, just the ticket. The pdf doc
does appear to have a slightly richer content than the hlp, I will refer to
this in future. >>

Just so you know, the WinHelp and PDF manuals are identical and generated
from the same source.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image