comp.lang.ada
 help / color / mirror / Atom feed
* Writing Ada records to MS Access
@ 2003-08-13 14:58 Brien L. Christesen
  2003-08-13 18:18 ` Tarjei T. Jensen
  2003-08-13 18:37 ` Chad R. Meiners
  0 siblings, 2 replies; 6+ messages in thread
From: Brien L. Christesen @ 2003-08-13 14:58 UTC (permalink / raw)


Ok, I looked through the archives and I still couldn't figure out what I
whould do.  I have some Ada records written to binary files.  These
records need to be put in a relational database.  Right now, this is done
by humans, but I'm sure there's a better way.  I could write the records
to some tab separated files, but that seems like an ugly way to do
it.  I've looked into GNADE a little bit, but I can't really figure out
what I should do with it.  I assume I need to write to an ODBC database
and import it into Access, but I couldn't figure out how to do that.  

Thanks for any help!
Brien



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

* Re: Writing Ada records to MS Access
  2003-08-13 14:58 Writing Ada records to MS Access Brien L. Christesen
@ 2003-08-13 18:18 ` Tarjei T. Jensen
  2003-08-13 18:37 ` Chad R. Meiners
  1 sibling, 0 replies; 6+ messages in thread
From: Tarjei T. Jensen @ 2003-08-13 18:18 UTC (permalink / raw)


Brien L. Christesen  wrote:
> Ok, I looked through the archives and I still couldn't figure out what I
> whould do.  I have some Ada records written to binary files.  These
> records need to be put in a relational database.  Right now, this is done
> by humans, but I'm sure there's a better way.  I could write the records
> to some tab separated files, but that seems like an ugly way to do
> it.  I've looked into GNADE a little bit, but I can't really figure out
> what I should do with it.  I assume I need to write to an ODBC database
> and import it into Access, but I couldn't figure out how to do that.

Have a look at http://www.adapower.com/. You should look into DCOM and stuff
and GNADE. With DCOM you should be able to re-use whatever VB skills you
have and use the JET objects to do the database stuff. GNADE uses ODBC.
Access has some ODBC stuff if my memory is correct (I am not use that you
need access as long as you have the ODBC driver for the JET db engine).


greetings,







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

* Re: Writing Ada records to MS Access
  2003-08-13 14:58 Writing Ada records to MS Access Brien L. Christesen
  2003-08-13 18:18 ` Tarjei T. Jensen
@ 2003-08-13 18:37 ` Chad R. Meiners
  2003-08-15 20:46   ` Tom Moran
  1 sibling, 1 reply; 6+ messages in thread
From: Chad R. Meiners @ 2003-08-13 18:37 UTC (permalink / raw)


In an NT-type system you should have a control panel icon that allows you to
setup up ODBC connections.  Setup a ODBC connection to an Access database.
Use one of packages that allow you to bind to ODBC to open the connection.
Build the tables and records using the SQL commands.

See
http://www.adapower.com/os/odbc.html
for an example of how to use the win32 ODBC binding.

-CRM





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

* Re: Writing Ada records to MS Access
  2003-08-13 18:37 ` Chad R. Meiners
@ 2003-08-15 20:46   ` Tom Moran
  2003-08-15 21:18     ` Chad R. Meiners
  2003-08-15 23:04     ` Stephane Richard
  0 siblings, 2 replies; 6+ messages in thread
From: Tom Moran @ 2003-08-15 20:46 UTC (permalink / raw)




Chad R. Meiners wrote:
> In an NT-type system you should have a control panel icon that allows you to
> setup up ODBC connections.  Setup a ODBC connection to an Access database.
> Use one of packages that allow you to bind to ODBC to open the connection.
> Build the tables and records using the SQL commands.
> 
> See
> http://www.adapower.com/os/odbc.html
> for an example of how to use the win32 ODBC binding.
> 
> -CRM
> 
> 
   That page shows reading ("select").  Can you point to a working 
example of writing/updating?




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

* Re: Writing Ada records to MS Access
  2003-08-15 20:46   ` Tom Moran
@ 2003-08-15 21:18     ` Chad R. Meiners
  2003-08-15 23:04     ` Stephane Richard
  1 sibling, 0 replies; 6+ messages in thread
From: Chad R. Meiners @ 2003-08-15 21:18 UTC (permalink / raw)



"Tom Moran" <tmoran@acm.org> wrote in message
news:iEb%a.122765$Oz4.25430@rwcrnsc54...
>    That page shows reading ("select").  Can you point to a working
> example of writing/updating?

I would like to, but the code I wrote is propriety :(  I'll look on my hard
drive to see if I have some non-related examples.  If I remember correctly
from two years ago, the leap from select to using commands such as ["Insert
into mytable with " & Integer'image(x) & ", " & mystring] is not too
difficult.   I'll check for you though over the weekend.

-CRM





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

* Re: Writing Ada records to MS Access
  2003-08-15 20:46   ` Tom Moran
  2003-08-15 21:18     ` Chad R. Meiners
@ 2003-08-15 23:04     ` Stephane Richard
  1 sibling, 0 replies; 6+ messages in thread
From: Stephane Richard @ 2003-08-15 23:04 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

Hi Tom, based on the code in the URL that he gave you, you'd just need to
replace:

QueryString   : Char_Array := To_C("Select * from CallList");

with
QueryString   : Char_Array := To_C("Insert Into CallList (FieldName1,
FieldName2) values (NumberValue1, 'StringValue2') ");

Depending on the structure of CallList, which I couldn't see :-).

and you should be un business to do your insert

--
St�phane Richard
Senior Software and Technology Supervisor
http://www.totalweb-inc.com
For all your hosting and related needs
"Tom Moran" <tmoran@acm.org> wrote in message
news:iEb%a.122765$Oz4.25430@rwcrnsc54...
>
>
> Chad R. Meiners wrote:
> > In an NT-type system you should have a control panel icon that allows
you to
> > setup up ODBC connections.  Setup a ODBC connection to an Access
database.
> > Use one of packages that allow you to bind to ODBC to open the
connection.
> > Build the tables and records using the SQL commands.
> >
> > See
> > http://www.adapower.com/os/odbc.html
> > for an example of how to use the win32 ODBC binding.
> >
> > -CRM
> >
> >
>    That page shows reading ("select").  Can you point to a working
> example of writing/updating?
>





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

end of thread, other threads:[~2003-08-15 23:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-13 14:58 Writing Ada records to MS Access Brien L. Christesen
2003-08-13 18:18 ` Tarjei T. Jensen
2003-08-13 18:37 ` Chad R. Meiners
2003-08-15 20:46   ` Tom Moran
2003-08-15 21:18     ` Chad R. Meiners
2003-08-15 23:04     ` Stephane Richard

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