Database Programming With JBuilder Step by Step Part 1 ( a quick reference )

Creating the DataStore file store = new DataStore();

l         Set the fileName for the DataStore file. store.setFileName(jdbcURL);

l         Set any other properties that must be set at create-time, like the blockSize, if desired.

l         To make the DataStore transactional:

Instantiate a TxManager new TxManager()

Assign it to the DataStore's txManager: store.setTxManager(new TxManager() )

l         Assign a name to the DataStore's userName property store.setUserName(jdbcUser);

l         Call the DataStore's create method store.create();

the create method (if successful) results in an open connection to the newly-created DataStore through the DataStore object

Connecting the JdataStore Database

you should use the DataStoreConnection class to open a connection to an existing DataStore.

    storeConnect = new DataStoreConnection();

    storeConnect.setFileName(jdbcURL);

    storeConnect.setUserName(jdbcUser);

When using the DataStore with a StorageDataSet:

l          DataSet.setStoreName("TabelleName");

l         DataSet.setStore(storeConnect);

 

Database and DataSet are implicitly opened when visual components bound to them open. When you are not using a visual component, you must explicitly open a DataSet. opening a DataSet implicitly opens a Database. A Database is never implicitly closed.

To make any data set updateable, set the updateMetaData property to NONE

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/61367/viewspace-797667/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/61367/viewspace-797667/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值