Redian新闻
>
Java调用Oracle存储过程的问题
avatar
Java调用Oracle存储过程的问题# Java - 爪哇娇娃
c*r
1
和QQ vs 360有些类似
http://techcrunch.com/2010/11/04/facebook-google-contacts/
Google To Facebook: You Can’t Import Our User Data Without Reciprocity
The war between Google and Facebook is heating up: Google just made one
small tweak to its Terms of
Service that will have a big impact on the world’s biggest social network.
From now on, any service that
accesses Google’s Contacts API — which makes it easy to import your list
of friends’ and coworkers’ email
addresses into another service — will need to offer reciprocity. Facebook
doesn’t, so it’s going to lose
access to this key piece of the social graph.
So what does that mean in layman’s terms? When you initially sign up for
Facebook, you’re run through a
series of prompts asking you to enter your Google account information so
that Facebook can import the
email addresses of your contacts. This is a very powerful feature because it
helps new users instantly
connect with dozens of their friends. And Google is turning it off, because
it thinks Facebook isn’t playing
fair.
You see, Facebook has never allowed users to export the contact information
of their friends. This has been
a gripe against the social network for years, because there’s never been an
easy way to pick up and leave
Facebook with your own data in tow. But what, you say? Didn’t Facebook just
launch a new feature that lets
you download your information?
Yes and no. The feature lets you download content you’ve uploaded — photos
, wall posts, videos, events,
and messages. But the export feature leaves out the most valuable set of
data: your contacts. Yes, Facebook
will give you a list of their names, but it doesn’t attach any contact
information: you don’t get their email
address, phone numbers, or anything else another service could use to
rebuild your social graph
somewhere else.
Here’s the relevant addition of the Terms of Service for the Contacts API:
5.8. Google supports data portability. By accessing Content through the
Contacts Data API or Portable
Contacts API for use in your service or application, you are agreeing to
enable your users to export their
contacts data to other services or applications of their choice in a way
that’s substantially as fast and easy
as exporting such data from Google Contacts, subject to applicable laws.
A Google spokesperson gave us this statement:
Google is committed to making it easy for users to get their data into and
out of Google products. That is
why we have a data liberation engineering team dedicated to building import
and export tools for users. We
are not alone. Many other sites allow users to import and export their
information, including contacts,
quickly and easily. But sites that do not, such as Facebook, leave users in
a data dead end.
So we have decided to change our approach slightly to reflect the fact that
users often aren’t aware that
once they have imported their contacts into sites like Facebook they are
effectively trapped. Google users
will still be free to export their contacts from our products to their
computers in an open, machine-
readable format–and once they have done that they can then import those
contacts into any service they
choose. However, we will no longer allow websites to automate the import of
users’ Google Contacts (via
our API) unless they allow similar export to other sites.
It’s important that when we automate the transfer of contacts to another
service, users have some certainty
that the new service meets a baseline standard of data portability. We hope
that reciprocity will be an
important step towards creating a world of true data liberation–and that
this move will encourage other
websites to allow users to automate the export of their contacts as well.
Facebook has claimed in the past that there are sensitive issues around
exporting contact information. But
that hasn’t stopped it from pulling in whatever data it can. And it has
also forged deals with both Hotmail
and Yahoo that will let those services access its contact data. Google didn
’t do a partnership with Facebook,
so it doesn’t get the goods.
avatar
t*k
2
存储过程有一个数组参数
类型是 Table of Varchar2(20)
在Java调用该存储过程时
要用什么数据类型传进来呢?
String [] 不行啊,如
Strign [] strArray = {"12","34","56"};
cs.setObject(1,strArray,java.sql.Types.ARRAY);
这样会抛出异常
那怎么传呢?
谁做过呢?
谢谢
avatar
s*r
3
Let's see who will win:
Googlers search for information, Facebookers just waste time.
Facebook wins!
avatar
w*g
4
what exception?

【在 t********k 的大作中提到】
: 存储过程有一个数组参数
: 类型是 Table of Varchar2(20)
: 在Java调用该存储过程时
: 要用什么数据类型传进来呢?
: String [] 不行啊,如
: Strign [] strArray = {"12","34","56"};
: cs.setObject(1,strArray,java.sql.Types.ARRAY);
: 这样会抛出异常
: 那怎么传呢?
: 谁做过呢?

avatar
h*i
5
谁拥有那些contact资料的所有权,是google,facebook还是用户自己?如果是用户自
己,而且这是显然的,因为联系人是你自己的联系人,那些资料都是用户输入的,为什
么facebook不让别人搬家?为什么google可以不让facebook搬家。这其中缺位的是用户
,是用户拥有最后的决定权。而google和facebook在获取这些资料之前必须经过用户授
权。
avatar
t*k
6
ClassCastException

【在 w*******g 的大作中提到】
: what exception?
avatar
w*g
7
I guess the problem is with the type of the array elements.
you have an array of string and you want to pass to jdbc that accepts
an array of some other types.
can you find out the types used for the jdbc elements?

【在 t********k 的大作中提到】
: ClassCastException
avatar
t*k
8
我也是这么认为的
想用java.sql.Array数据类型试试
但怎么把String[]转换成java.sql.Array类型呢?
查了查API
好象没有互转的方法啊

【在 w*******g 的大作中提到】
: I guess the problem is with the type of the array elements.
: you have an array of string and you want to pass to jdbc that accepts
: an array of some other types.
: can you find out the types used for the jdbc elements?

avatar
t*k
9
另外我用jdbc接连oracle,好象上面的异常是不抛出了
但还是有点问题
用下面的测试代码
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection(
"jdbcracle:thin:@localhost:1521rcl",
"scott", "tiger");
String sql = "{?=call PckgStudSltCourse.addStudPreSltCourse(?,?,?,?)}";
ResultSet rs = null;
CallableStatement cs = con.prepareCall(sql);
cs.registerOutParameter(1,java.sql.Types.INTEGER);
String [] courseIDs = {"12","34","56"};
int count = 0;
cs.setString(2,years);
cs.setString(3,termID);
cs.setStri

【在 t********k 的大作中提到】
: 存储过程有一个数组参数
: 类型是 Table of Varchar2(20)
: 在Java调用该存储过程时
: 要用什么数据类型传进来呢?
: String [] 不行啊,如
: Strign [] strArray = {"12","34","56"};
: cs.setObject(1,strArray,java.sql.Types.ARRAY);
: 这样会抛出异常
: 那怎么传呢?
: 谁做过呢?

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。