通过Android应用程序连接到OracleDB [英] Connecting to an OracleDB via an Android app

查看:161
本文介绍了通过Android应用程序连接到OracleDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Thans的期待,我希望你能帮助我。

Thans for looking, I hope you could help me.

目前,我想从我的Andr​​oid应用程序获取从OracleDB服务器(LAN上)的一些数据。我使用JDBC与将ojdbc14.jar及以下code在我的Andr​​oid应用程序和堆栈跟踪我与logcat的:

Currently, I want to get some data from an OracleDB server (on the LAN) from my Android app. I'm using JDBC with the ojdbc14.jar and the following code in my Android app and the stackTrace I have with the logcat :

http://pastebin.archlinux.fr/432118

正如你所看到的,是一个很大的例外,我不能够解决这个问题...

As you can see, there is a big exception, and I'm not be able to fix it...

是否有人已经成功地与他的Andr​​oid应用程序和web服务没有一个OracleDB连接? 有人能帮助我解决这个例外?

Has someone already succeeded in a OracleDB connection with his Android app and without webservices ? Could someone help me fixing this Exception ?

有关信息:我试着改变ojdbc驱动程序,我检查了网址有效性(最糟糕的事情我做过>>)。

For information : I've tried to change the ojdbc driver (the worst thing I've ever done >.>), and I checked the URL validity.

感谢您的帮助......

Thanks for helping...

编辑:应用程序将需要从OracleDB获取数据,并将其存储在Android上的本地SQLite数据库,因为Android设备将在局域网断开连接(我不想让从数据访问网站[3G])。一旦断开连接,应用程序将与在SQLite的本地数据。当用户的活动完成时,该装置将被重新连接到LAN和应用程序同步与Oracle DB中的主服务器已编辑的SQLite本地数据。 SQLite的< - 本地 - >应用< - 当连接/同步---> OracleDB

EDIT : The application will have to get data from the OracleDB, and store it on the local SQLite DB of Android, because the Android device will be disconnected of the LAN (and I don't want to make the data accessible from web [3G]). Once disconnected, the app will work with the local data on SQLite. When the user's activity is finished, the device will be reconnected to the LAN and the app syncs the edited SQLite local data with the main Oracle DB server. SQLite <-- local --> App <-- when connected/sync ---> OracleDB

推荐答案

甲骨文实际上有专门为同步Oracle数据库与移动设备而设计的产品。这就是所谓的移动服务器。

Oracle actually has a product specifically designed for syncing the Oracle Database with mobile devices. It's called mobile server.

然而,使用模型是从你描述略有差异;而不是直接连接到Oracle数据库,你可以使用本地的Berkeley DB和SQLite数据库,然后移动服务器将同步与Oracle数据库。

However the usage model is slightly different from what you're describing; instead of connecting directly to Oracle Database, you would use a local Berkeley DB or SQLite database, and then mobile server would sync that with the Oracle Database.

它可以作为一个单独的进程,自动处理同步运行,也可以使用API​​调用来在程序内部控制同步。如果这听起来像的东西,可能对你有用,的点击此处查看

It can run as a separate process that automatically handles sync, or you can use API calls to control sync from within your program. If that sounds like something that could be useful to you, check it out here.

您可以从下载选项卡中下载并尝试一下。

You can download it from the download tab and try it out.

祝您好运与解决您的问题。

Best of luck with solving your problem.

问候

埃里克, 甲骨文PM

Eric, Oracle PM

这篇关于通过Android应用程序连接到OracleDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆