e股脑电脑教程网
  • 首 页
  • 操作系统
  • 应用软件
  • 下载工具
  • 影音视频
  • 办公软件
  • 媒体制作
  • 网站建设
  • 平面设计
  • 数据库
  • 程序开发
  • 视频教程
编辑推荐: | 文章搜索:
您现在的位置: e股脑 >> 程序开发 >> PowerBuilder教程 >> 如何存取二进制大对象(BLOBs) >> 教程正文
 
教程搜索
 
 
相关教程
  • 在PowerBuilder中利用DataStore实现查
  • 什么是“pbcat表?
  • 修改PB6的PBL,使之在PB5中可用
  • 使用日期格式时的一些问题
  • 如何存取二进制大对象(BLOBs)
  • 关于PowerBuilder的补丁包
  • 如果在isql中建立表或者增加表字段或者
  • PB高级开发环境配置
  • 动态设置Win95和NT的缺省打印机
  • PowerBuilder6.0运行环境文件列表
  • PowerBuilder、InfoMaker和HTML DataW
  • PB API调用原型
  • 如何用VC创建可在PB中调用的DLL
  • PB应用技巧——数据窗口自动折行
  • 为PB加入具有布局功能的容器组件
  • PB7.0通用选字段查询窗口的设计
 
 

图文教程


  • Windows抢了谁的饭碗 非主流操作系统To

  • 地球还是火星 平常心看“非主流”

  • 综合运用Office 2007批量制作奖状

  • 没有系统盘如何才能修复受损系统?

  • 巧妙运用Excel中边界的附加功能!
 
 
赞 助 商
 
 
如何存取二进制大对象(BLOBs)
  • 来源:e股脑
  • 点击次数:
  • 更新时间:2007-8-9
the Windows Registration Database. If your server is not listed, you will have to use the registration editor to add it. Manual editing of the registration database is not a trivial task, and is not recommended to the novice. See your windows manual for information on Regedit. Client Name Expression:

This expression will evaluate to a unique string for each row in the blob column. This allows OLE to reference each blob row as a unique object. This case uses a series of unique expressions created by adding the unique blobkey onto the string blob'. It is common to use the primary key field in this expression. Test your OLE column in the Design Preview mode. Double-clicking on the control will start the server application, either with a new document , if you specified the server by object class, or with a copy of the template, if you specified a template file. In order to make the OLE column more visible, it is often a good idea to place a graphic object behind it, or to give it visible border. When you have actually stored data in the column, the control will be represented on the data window by an icon appropriate to the server application you have assigned to that OLE column. In our case the control will be represented by the cassette icon appropriate to the Microsoft Sound System .WAV server, the Quick Recorder. Updating an OLE Column OLE columns should never be updated from anywhere but within the datawindow. OLE objects are stored along with a "wrapper" or object container that describes their class and provides information on the server which originated them, and this "wrapper" must be reserved when the field is updated. This functionality is built into the datawindow and the OLE column object, but if you attempt to update the Blob from somewhere else you will destroy the wrapper around the data, leaving it useless with respect to OLE. Using the dwOLEActivate Function

If you wish to activate an OLE column programmatically i.e., without requiring the user to double- click on the column you can make use of the dwOLEActivate. Also, if you wish to activate an OLE column using a 'verb' different from the default you will need to use this function. The format of this function is: datawindowcontrol.dwOLEActivate ( row, column, verb ) datawindowcontrol: The name of the DataWindow control or child DataWindow from which you want to activate on-line linking and embedding (OLE). row: A long identifying the row location of the OLE object column: The column location of the OLE object. It is best to use a string containing the column name. Using the example in figure 1, this would be "sound_blob" verb : Usually 0, but the verb is dependent on the OLE server Let assume for the moment that you have created a datawindow, called "dw_sound", which has an OLE column called "sound_blob" which is used to contain .WAV files with Microsoft's Quick Recorder as the OLE Server. Some sample commands might be: dw_sound.dwOLEActivate(5, "sound_blob", 1) This will activate OLE for the OLE Column "dw_sound" in row five. We are passing the verb 1, which means Edit for this OLE Server, so we will activate the link for edit. dw_sound.dwOLEActivate(2, 4, 0) This will activate OLE for row two, column four (which better be an OLE column!), passing the verb 0. In this case 0 represents the action "Play" so this command will play the .WAV stored in row two, column four. A Note on Verbs

: What each verb does and which number maps to that verb vary with each OLE server. See the documentation provided with your OLE server to determine this. To see a list of verbs for your server you can consult the Registration Database, using Microsoft's REGEDIT.EXE, which is provided with windows. To do so, run this command line: REGEDIT /V Which will show you the Registration Tree, from which you can see the verbs and their associated numeric values. Note: The Registration Database is essential to many Windows operations. Consequently, you should never manually edit the database, unless it is absolutely necessary. Should editing be necessary you should be very careful in the process. A Note to Sybase Users While Sybase will handle OLE columns well, there is a limitation with blobs mapping onto the text datatype. Because of the way Sybase's string functions work, you are limited to a 4K field size when working with the Text type as a blob field. The work around for this is to make the field an OLE field, as the low-level functions which deal with the SQL Server in OLE columns do not have this 4K limit. III. Accessing Informatio

上一页  1 2 3 4 下一页
  • 上一篇教程: 关于PowerBuilder的补丁包
  • 下一篇教程: 使用日期格式时的一些问题
  •  

    关于本站 | 广告联系 | 版权声明 | 使用帮助

    Copyright © 2004-2008 www.egunao.com All rights reserved.