Home > database >  Pb ole database blob can show two page Word document data?
Pb ole database blob can show two page Word document data?

Time:09-18

I use pb ole database blob column shows the Word document data, when save in Word document is the second page, blob columns can't show two pages, can only display a page of data, to see whether the two pages can only activate the Word document to view,
Excuse me, can not open the Word master can see the second page of the document data?
Activation code Word: dw_1. OLEActivate (dw_1. Getrow (), "f_olename", 0)
I am using PB9 + SQL SERVER 2005, friends, please give directions

CodePudding user response:

Change the method, this method is not achieve the

Suggest you remove the data from the database using selectblob came in a temporary directory, generate a word file, and then use ole connect this word file to see it

CodePudding user response:

Displayed as if after connected with ole, also can be to display a page, page can't display at the same time two, want to see also want to open the Word to see, I want to achieve with ole controls directly show that there are two pages of the document, have a good way

CodePudding user response:

I want to ask, may be PB9 into higher version can achieve?
Or, cannot datawindow, with other controls can realize two or more similar to a word document or two pages of data

CodePudding user response:

Specific never done, say,,
The key to implement this function is to cut the multi-page document into a single page document, if doesn't edit view only, can be reduced to save as a single page images, and then put the pictures in the database, then use lzp_lzp method to retrieve the local by ole control, according to

In fact, that is, to solve the problem of word turn JPG, in order to facilitate implementation, only give up to use the db ole controls, with ole controls directly,

CodePudding user response:

In addition, want to ask everybody: db ole double-click can directly open the Word, now I can't open the Word want to double-click, done by buttons, how to implement, thanks

CodePudding user response:

Try to use the API simulation, double-click to re-post

PB code simulation button keybd_event API function, and the corresponding key value description
Subroutine keybd_event (char bVk, char bScan, ulong dwFlags, ref ulong dwExtraInfo) Library "USER32. DLL
"Function definitions, such as:
Ulong ll_ExtraInfo
Char lc_shift, lc_tab
Lc_shift=char (16)
Lc_tab=char (9)

Keybd_event (lc_shift, char (0), 0, ll_ExtraInfo)
Keybd_event (lc_tab, char (0), 0, ll_ExtraInfo)
Keybd_event (lc_tab, char (0), 2, ll_ExtraInfo)
Keybd_event (lc_shift, char (0), 2, ll_ExtraInfo)//statement in the window below the global or local external function: code trigger buttons
Subroutine keybd_event (int bVk, int bScan, int dwFlags, int dwExtraInfo) Library "user32
"//the TAB key keyvalues to 9, the following use:
////keybd_event (9,0,0,0) is equal to the key value of 9 key is pressed, the TAB key is pressed,
////keybd_event (9,0,2,0) is equal to the key value of 9 key is released, the TAB key is released,
//shift key value is 16. Other you can check information,

VK_Down=40. VK_LEFT=37. VK_UP=38. VK_RIGHT=39
F1 to F12 respectively corresponding to the 112-123

Key code constant


Key code
Constant value description
VbKeyLButton 1 mouse
VbKeyRButton 2 the right mouse button
VbKeyCancel 3 CANCEL button
VbKeyMButton 4 middle mouse button
8 the BACKSPACE key vbKeyBack
VbKeyTab 9 TAB
VbKeyClear 12 CLEAR key
VbKeyReturn 13 ENTER
VbKeyShift 16 SHIFT key
VbKeyControl 17 CTRL key
VbKeyMenu 18 menu
VbKeyPause 19 PAUSE key
VbKeyCapital 20 CAPS LOCK key
27 ESC vbKeyEscape
VbKeySpace 32 SPACEBAR key
VbKeyPageUp 33 PAGEUP key
VbKeyPageDown 34 PAGEDOWN key
VbKeyEnd 35 END keys
VbKeyHome 36 HOME button
VbKeyLeft 37 LEFT ARROW keys
VbKeyUp 38 the UP ARROW keys
VbKeyRight 39 RIGHT ARROW keys
VbKeyDown 40 the DOWN ARROW key
VbKeySelect 41 the SELECT key
VbKeyPrint 42 the PRINT SCREEN key
43 the EXECUTE button vbKeyExecute
VbKeySnapshot 44 SNAP SHOT key
VbKeyInser 45 INS key
VbKeyDelete 46 DEL keys
VbKeyHelp 47 HELP key
VbKeyNumlock 144 NUM LOCK key


A key to the Z key corresponding with its ASCII value 'A' to 'Z' is consistent with the
Constant value description
VbKeyA 65 A key
VbKeyB 66 B keys
VbKeyC 67 C key
VbKeyD 68 D keys
VbKeyE 69 E key
VbKeyF 70 F key
VbKeyG 71 G
VbKeyH 72 H key
73 I key vbKeyI
74 J vbKeyJ
VbKeyK 75 K key
VbKeyL 76 L keys
VbKeyM 77 M
VbKeyN 78 N key
VbKeyO 79 O key
Key vbKeyP 80 P
VbKeyQ 81 Q keys
VbKeyR 82 R
VbKeyS 83 S
VbKeyT 84 T
VbKeyU 85 U key
VbKeyV 86 V
VbKeyW 87 W keys
VbKeyX 88 X key
VbKeyY 89 Y
VbKeyZ 90 Z key


0 to 9 keys corresponding with its ASCII value '0' to '9' is consistent with the
Constant value description
VbKey0 48 0 keys
VbKey1 49 1
VbKey2 50 2 keys
VbKey3 51 3 keys
VbKey4 52 4 keys
VbKey5 53 5 keys
VbKey6 54 6 key
VbKey7 55 7 keys
VbKey8 56 8 key
VbKey9 57 9 key


The key on the numeric keypad
Constant value description
VbKeyNumpad0 96 0 keys
VbKeyNumpad1 97 1
VbKeyNumpad2 98 2 keys
VbKeyNumpad3 99 3 keys
VbKeyNumpad4 100 4 keys
VbKeyNumpad5 101 5 keys
VbKeyNumpad6 102 6 key
VbKeyNumpad7 103 7 keys
VbKeyNumpad8 104 8 key
VbKeyNumpad9 105 9 key
VbKeyMultiply 106 multiplication sign (*) keys
VbKeyAdd 107 plus (+) key
VbKeySeparator ENTER 108 (on the numeric keypad)
VbKeySubtract 109 minus sign (-) keys
VbKeyDecimal 110 decimal point (.) key
VbKeyDivide 111 devide (/) key


The function keys
Constant value description
VbKeyF1 112 F1 key
113 F2 vbKeyF2
VbKeyF3 114 F3 key
VbKeyF4 115 F4 keys
VbKeyF5 F5 116
VbKeyF6 117 F6 key
118 the F7 key vbKeyF7
VbKeyF8 119 F8 key
120 the F9 key vbKeyF9
VbKeyF10 121 F10 key
VbKeyF11 122 F11 key
123 the F12 key vbKeyF12
VbKeyF13 124 F13 keys
VbKeyF14 125 F14 keys
VbKeyF15 126 F15 keys
127 F16 vbKeyF16 keys

CodePudding user response:

Very grateful to the 6 # the help of friends, wrote so many code,
I really don't understand, the above code can realize restrict user double-click to open the db ole controls?

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related