comp.lang.ada
 help / color / mirror / Atom feed
* Interface between Ada (AdaCore 6.1) and Microsoft Access Database (PC/XP)
@ 2008-12-03 15:33 shulamith.sarfaty
  2008-12-03 18:30 ` Jeffrey R. Carter
  2008-12-03 19:35 ` Dmitry A. Kazakov
  0 siblings, 2 replies; 3+ messages in thread
From: shulamith.sarfaty @ 2008-12-03 15:33 UTC (permalink / raw)


Please show me an example how to manipulate record sets from
Microsoft Access Database. We need to open a connection,
execute an SQL statement to UPDATE, INSERT, DELETE and/or SELECT
records from the database. Also, I dynamically create a
variable string containing my SQL statement. I want to
execute an SQL string which is variable in length. How do I free
the pointer to that string?
Thanks.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Interface between Ada (AdaCore 6.1) and Microsoft Access Database (PC/XP)
  2008-12-03 15:33 Interface between Ada (AdaCore 6.1) and Microsoft Access Database (PC/XP) shulamith.sarfaty
@ 2008-12-03 18:30 ` Jeffrey R. Carter
  2008-12-03 19:35 ` Dmitry A. Kazakov
  1 sibling, 0 replies; 3+ messages in thread
From: Jeffrey R. Carter @ 2008-12-03 18:30 UTC (permalink / raw)


shulamith.sarfaty@baesystems.com wrote:
> Please show me an example how to manipulate record sets from
> Microsoft Access Database. We need to open a connection,
> execute an SQL statement to UPDATE, INSERT, DELETE and/or SELECT
> records from the database. Also, I dynamically create a
> variable string containing my SQL statement. I want to
> execute an SQL string which is variable in length. How do I free
> the pointer to that string?

What DB binding are you using? And why would you use a pointer and risk memory 
leaks when you don't need to?

-- 
Jeff Carter
"Ah, go away or I'll kill ya."
Never Give a Sucker an Even Break
100



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Interface between Ada (AdaCore 6.1) and Microsoft Access Database (PC/XP)
  2008-12-03 15:33 Interface between Ada (AdaCore 6.1) and Microsoft Access Database (PC/XP) shulamith.sarfaty
  2008-12-03 18:30 ` Jeffrey R. Carter
@ 2008-12-03 19:35 ` Dmitry A. Kazakov
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry A. Kazakov @ 2008-12-03 19:35 UTC (permalink / raw)


On Wed, 3 Dec 2008 07:33:41 -0800 (PST), shulamith.sarfaty@baesystems.com
wrote:

> Please show me an example how to manipulate record sets from
> Microsoft Access Database. We need to open a connection,
> execute an SQL statement to UPDATE, INSERT, DELETE and/or SELECT
> records from the database.

Take a look at GNADE ODBC, which is Ada binding to ODBC.

> Also, I dynamically create a
> variable string containing my SQL statement. I want to
> execute an SQL string which is variable in length. How do I free
> the pointer to that string?

Create it on the stack and you will need not to care about freeing it. It
is also recommended to use precompiled (so-called "prepared") statements
rather than reinterpret it each time.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-03 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-03 15:33 Interface between Ada (AdaCore 6.1) and Microsoft Access Database (PC/XP) shulamith.sarfaty
2008-12-03 18:30 ` Jeffrey R. Carter
2008-12-03 19:35 ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox