[aprssig] Oracle connection ?
Gerry Creager N5JXS
gerry.creager at tamu.edu
Wed Jun 29 10:54:45 EDT 2005
I'd also be looking at postGIS (www.refractions.net) for an alternative.
Lots of work has gone into this package; it's what I'm using for my
weather site now.
gerry
Andrew Rich wrote:
> Sorted
>
> 1) Installed the Oracle Client for LINUX
> 2) Installed DBD::Oracle using cpan
> 3) Define some env variables
>
> Cheers and thanks guys !
>
>
>
> -----Original Message-----
> From: scott at opentrac.org [mailto:scott at opentrac.org]
> Sent: Friday, 24 June 2005 12:56 AM
> To: 'TAPR APRS Mailing List'
> Subject: RE: [aprssig] Oracle connection ?
>
>
> I'd also suggest using bind variables if possible. Generating a SQL
> statement dynamically (e.g. sql = "select * from table where x = '" & xyz &
> "'") can be a security risk if not done right, and even if you're executing
> the same query a million times with different values it's still got to parse
> the statement every time. If you can use bind variables (e.g. xyz = "foo";
> sql = "select * from table where x = &xyz") then Oracle will be able to
> cache the parsed statement and can process it faster.
>
> The exact details of how to do it vary depending on the language and
> interface mechanism you're using. I'd imagine it's possible in JDBC, but I
> don't do much Java myself.
>
> If you want a starting point, I'll see if I can find the source code for my
> Windows service.
>
> Scott
> N1VG
>
>
>>-----Original Message-----
>>From: aprssig-bounces at lists.tapr.org
>>[mailto:aprssig-bounces at lists.tapr.org] On Behalf Of Gregg Wonderly
>>Sent: Thursday, June 23, 2005 7:43 AM
>>To: TAPR APRS Mailing List
>>Subject: Re: [aprssig] Oracle connection ?
>>
>>
>>>I have the opportunity to place aprs data on an oracle database.
>>>
>>>anyone had experience developing access mechanisms to
>>
>>connect to oracle
>>
>>>?
>>
>>>3) Java
>>
>>Andy, the JDBC interface in Java is straight forward to use.
>>If you need some help, I can give you some code, and make
>>some suggestions. The place to start is
>>
>>Connection c = java.sql.DriverManager.getConnection( ...
>>connection parms ... ); Statement stmt = c.getStatement(); try {
>> int val = stmt.executeUpdate( "insert into <table>
>>(...) values (...)"); } finally {
>> stmt.close();
>>}
>>
>>and for queries,
>>
>>try {
>> ResultSet rs = stmt.executeQuery( "select f1,f2,f3 from
>><table> where ...");
>> try {
>> while( rs.next() ) {
>> String f1 = rs.getString("f1");
>> double f2 = rs.getDouble("f2");
>> ... do something with the queried data ...
>> }
>> } finally {
>> rs.close();
>> }
>>} finally {
>> stmt.close();
>>}
>>
>>Gregg Wonderly
>>
>>_______________________________________________
>>aprssig mailing list
>>aprssig at lists.tapr.org
>>https://lists.tapr.org/cgi-bin/mailman/listinfo/aprssig
>>
>>
>
>
>
>
> _______________________________________________
> aprssig mailing list
> aprssig at lists.tapr.org
> https://lists.tapr.org/cgi-bin/mailman/listinfo/aprssig
>
>
>
> _______________________________________________
> aprssig mailing list
> aprssig at lists.tapr.org
> https://lists.tapr.org/cgi-bin/mailman/listinfo/aprssig
--
Gerry Creager -- gerry.creager at tamu.edu
Texas Mesonet -- AATLT, Texas A&M University
Cell: 979.229.5301 Office: 979.458.4020 FAX: 979.847.8578
Page: 979.228.0173
Office: 903A Eller Bldg, TAMU, College Station, TX 77843
More information about the aprssig
mailing list