DataWindow's "Create large binary/text database OLE object"

1) For the life of me, I cannot figure out how to load the
datawindow's "Create large binary/text database OLE object" with a PDF
file stored in a binary column in a SQL Anywhere 11 database (via
'System DSN' ODBC).  I have successfully done so populating an OLE
Object with PDF straight from a file location, but cannot get the DB
OLE object type to work.

2) When I populated the OLE Object with a PDF straight from file and
resize the PDF to actual size, the PDF text is blurred (pixelated).
Thsi is especially a problem as I have to be able to print this PDF
(moreover, the datawindow that dispalys this PDF) in conjuntion with
other datawindows as a single print job (must collate several DWs).
Is there a setting or workaround that can display the PDF in its clear
"true" state?

I tried, as an alternative, to print from the Adobe Acrobat ocx
control on a window, and that PDF's text is clear and perfect.  Why
can't the datawindow do the same thing?  I find this perplexing!

3) For some reason, I cannot get UPDATEBLOB to update binary field in
database.  I have copied/pasted the PB Help example verbatum (changing
column/table/trans object names accordingly), but SQLNRows keeps
returning 0:

"int   fh
blob  lbl_doc

fh = FileOpen("c:\test.pdf", StreamMode!)
IF fh <> -1 THEN
        FileRead(fh, lbl_doc)
        FileClose(fh)

        UPDATEBLOB communication_log SET document_image = :lbl_doc
        WHERE communication_log_id = 1
        USING SQLCA ;
END IF

IF SQLCA.SQLNRows > 0 THEN
        COMMIT USING SQLCA ;
END IF"

The PDF file I am trying to update is 70344kb in size.  I'm assuming
it is my ODBC connection giving me hardships, possibly given it's file
size, but cannot confirm.  I was able to update the field via Sybase
Central, so I know the table/column can handle it.

Any help would be greatly appreciated.  I realize that the 3rd issue
is not datawindow-specific, but figured that I would ask here given
the similarities to the first 2 problems.

Using:
- PB 11.5
- SQL Anywhere 11 via 'System DSN' ODBC
- Windows XP Pro

Thank you in advance!
0
pleaselogin
12/7/2009 4:53:59 PM
sybase.powerbuilder.datawindow 28057 articles. 5 followers. Follow

1 Replies
784 Views

Similar Articles

[PageSpeed] 55
Get it on Google Play
Get it on Apple App Store

On Dec 7, 10:53=A0am, pleaselogin <pleaselo...@gmail.com> wrote:
> 1) For the life of me, I cannot figure out how to load the
> datawindow's "Create large binary/text database OLE object" with a PDF
> file stored in a binary column in a SQL Anywhere 11 database (via
> 'System DSN' ODBC). =A0I have successfully done so populating an OLE
> Object with PDF straight from a file location, but cannot get the DB
> OLE object type to work.
>
> 2) When I populated the OLE Object with a PDF straight from file and
> resize the PDF to actual size, the PDF text is blurred (pixelated).
> Thsi is especially a problem as I have to be able to print this PDF
> (moreover, the datawindow that dispalys this PDF) in conjuntion with
> other datawindows as a single print job (must collate several DWs).
> Is there a setting or workaround that can display the PDF in its clear
> "true" state?
>
> I tried, as an alternative, to print from the Adobe Acrobat ocx
> control on a window, and that PDF's text is clear and perfect. =A0Why
> can't the datawindow do the same thing? =A0I find this perplexing!
>
> 3) For some reason, I cannot get UPDATEBLOB to update binary field in
> database. =A0I have copied/pasted the PB Help example verbatum (changing
> column/table/trans object names accordingly), but SQLNRows keeps
> returning 0:
>
> "int =A0 fh
> blob =A0lbl_doc
>
> fh =3D FileOpen("c:\test.pdf", StreamMode!)
> IF fh <> -1 THEN
> =A0 =A0 =A0 =A0 FileRead(fh, lbl_doc)
> =A0 =A0 =A0 =A0 FileClose(fh)
>
> =A0 =A0 =A0 =A0 UPDATEBLOB communication_log SET document_image =3D :lbl_=
doc
> =A0 =A0 =A0 =A0 WHERE communication_log_id =3D 1
> =A0 =A0 =A0 =A0 USING SQLCA ;
> END IF
>
> IF SQLCA.SQLNRows > 0 THEN
> =A0 =A0 =A0 =A0 COMMIT USING SQLCA ;
> END IF"
>
> The PDF file I am trying to update is 70344kb in size. =A0I'm assuming
> it is my ODBC connection giving me hardships, possibly given it's file
> size, but cannot confirm. =A0I was able to update the field via Sybase
> Central, so I know the table/column can handle it.
>
> Any help would be greatly appreciated. =A0I realize that the 3rd issue
> is not datawindow-specific, but figured that I would ask here given
> the similarities to the first 2 problems.
>
> Using:
> - PB 11.5
> - SQL Anywhere 11 via 'System DSN' ODBC
> - Windows XP Pro
>
> Thank you in advance!

In problem 3, I noticed it says FileRead().  I am actually using
FileReadEx():
"int   fh
blob  lbl_doc

fh =3D FileOpen("c:\test.pdf", StreamMode!)
IF fh <> -1 THEN
        FileReadEx(fh, lbl_doc)
        FileClose(fh)

        UPDATEBLOB communication_log SET document_image =3D :lbl_doc
        WHERE communication_log_id =3D 1
        USING SQLCA ;
END IF

IF SQLCA.SQLNRows > 0 THEN
        COMMIT USING SQLCA ;
END IF"

Pardon the confusion!
0
pleaselogin
12/7/2009 5:01:41 PM
Reply:

Similar Artilces:

Can "ole control" get the "ole database blob" of datawindow?
Now,I'm doing with the "ole database blob" in pb6.0(The DBMS is MS_sqlserver6.5). I want to transfer data from the "ole database blob" to "ole control", then, transfer data from "ole control" to "ole database blob". If PB6.5 has functions (like "getitemstring","setitem" )to communicate from "ole database blob" to "ole control", please write to me. Thank you very much! ...

Can "ole control" get the data from "ole database blob" of datawindow?
Now,I'm doing with the "ole database blob" in pb6.0(The DBMS is MS_sqlserver6.5). I want to transfer data from the "ole database blob" to "ole control", then, transfer data from "ole control" to "ole databaseblob". If PB6.5 has functions (like "getitemstring","setitem" )to communicate from "ole database blob" to "ole control", please write to me. Thank you very much! ...

Describe("DataWindow.Objects") Functionality for Report DataWindow object Doesn't Work
Hello there. I want to change the nested report object(s) attributes. I had used Describe() function to get objects -("DataWindow.Objects"). After removing the tab spaces I was able to get the object name within that DW. By checking the Attributes -(ls_obj + ".Attributes") I came to know by finding "nested_argument" that the current object is (nested) report. Now if I assigned this object to the DDDWChild/Any variable it gives error either at compilation or at run time. If I created a datastore locally & assigned the dataobject of the current ...

How to create a "database blob object" in datawindow ??
How to create a database blob object in datawindow ?? Thank's for your help ! This is outlined in some detail in the online books. wang wei <wangwei@toamil.com.tw> wrote in message news:D9sm5OBh$GA.201@forums.sybase.com... > How to create a database blob object in datawindow ?? > > Thank's for your help ! > > > ...

superreview requested: [Bug 315633] "Create Profile" dialog text doesn't match button text: "Click Finish"->"Done", "click Next"->"Continue" : [Attachment 206616] Use Mac-appropriate text in profile #2
Steuard Jensen <steuard+mozilla@slimy.com> has asked Daniel Veditz <dveditz@cruzio.com> for superreview: Bug 315633: "Create Profile" dialog text doesn't match button text: "Click Finish"->"Done", "click Next"->"Continue" https://bugzilla.mozilla.org/show_bug.cgi?id=315633 Attachment 206616: Use Mac-appropriate text in profile creation https://bugzilla.mozilla.org/attachment.cgi?id=206616&action=edit ...

superreview requested: [Bug 315633] "Create Profile" dialog text doesn't match button text: "Click Finish"->"Done", "click Next"->"Continue" : [Attachment 206616] Use Mac-appropriate text in profile #3
Daniel Veditz <dveditz@cruzio.com> has asked Benjamin Smedberg [:bs] (bsmedberg@) <benjamin@smedbergs.us> for superreview: Bug 315633: "Create Profile" dialog text doesn't match button text: "Click Finish"->"Done", "click Next"->"Continue" https://bugzilla.mozilla.org/show_bug.cgi?id=315633 Attachment 206616: Use Mac-appropriate text in profile creation https://bugzilla.mozilla.org/attachment.cgi?id=206616&action=edit ------- Additional Comments from Daniel Veditz <dveditz@cruzio.com> blame says bsmed...

How to mofify text 'xyz' after issuing a dw_1.modify("CREATE TEXT(band='footer' text='xyz' ............)")
Hi All, I am new to Powerbuilder and on a steep learning curve so please bear with me and do not assume I know anything in your response! I have a datawindow control 'dw_1' in a window 'w_report_1' With the w_report_1.open() event, I assign a data object 'd_site_details' to the 'dw_1' control in the following code extract. I use a loop to provide different retrieval arguments for 'd_site_details' from a datastore so that we get different details for different system accounts. After each retrieval we print dw_1 together with a text footer w...

Deleting "to's" and "from's" on emails
Name: Rae McFarland Email: larryatmacsmachinedotcom Product: Firefox Summary: Deleting "to's" and "from's" on emails Comments: There doesn't seem to be a way to edit and email and then forward it. Some people send something I'd like to forward, but there's a whole page of previous mailing addresses. I'd like to delete them before forwarding. I've tried and the whole email gets deleted. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16 From URL: http://hendrix.mozi...

dw_1.Modify("DataWindow.StoragePageSize='LARGE'")
Dear PowerBuilder 7.03 Developers, The application I support here at work (PB7.03) has been having an excessive amount of 'Out of Memory' Errors. The app is running in a WindowsNT 4.0 environment. Today, in a Sybase White Paper, I found something that I think could help me with this problem but I have been unable to find anymore information on the following DataWindow property: dw_1.Modify("DataWindow.StoragePageSize='LARGE'") I can't find "StoragePageSize" anywhere. This case was originally listed in Sybase Case Id: 41085432. Can...

Bug? Composition Datawindow with text fields fails when setting "no" or "yes" to text property
Hi, I have a composition Datawindow containing 2 datawindows and some text fields. When I set the text-fields from programm all works fine, except when I try to set the text-fields to "no" dw_report.object.t_checked.text = 'ne' // this works when I replace the above line with dw_report.object.t_checked.text = 'no' // this fails with "Error accessing external property text at line ...." For me it seems to be a bug - have no idea what is going on I am using Powerbuilder 8 (Build 9506) regards Bernhard P.S.: This also fails: c...

Wired's Vista "Do's" Have Some Major "Don'ts"
Wired has an article up about how to speed up Vista. While they have a couple OK tips in there, there are a couple of suggestions that caught my attention as colossally BAD. I tried to edit the wiki page to reflect this, but I was rebuffed by the original author. So much for community contributions. http://www.windows-now.com/blogs/robert/archive/2008/02/27/wireds-vista-dos-have-some-major-donts.aspx -- "Never drive faster than your ANGEL can fly" In grc.techtalk, on Fri, 14 Nov 2008 17:32:04, paradoX wrote: >Wired has an article up about how to speed up Vist...

What's with "~/" and NOT "~/" ?
In trying to deplay test projects to my provider (GoDaddy) I'm finding a consistent barfness with the form of reference that I read as "in this directory, this file"  or "~/filename.filetype". I am having to consistently strip the "~/" to make it work.Is there a way to strip off this type of reference through a preference? In the past, I've been led to believe that "filename.filetype" when in the same directory was just FINE as that -- no need for this "~/".Hints, direction, etc. welcomed and appreciated in advance ... mahalos .....

Database containing "What's New" and "Behaviour Changes"
Each individual "What's New" and "Behaviour Change" description should be separately documented, and stored in a simple database together with the release number in which it appeared. This will let people do queries like "show me all the behaviour changes that apply to an upgrade from 5.5.04 to 9.0.1". You could put such a database up on ianywhere.com using web services for the queries :) Breck -- bcarter@risingroad.com Mobile and Distributed Enterprise Database Applications www.risingroad.com I think this is a good idea! --- Kjetil --- ...

Where can I find "CBO" and it's method's "InitializeObject" etc.
Hello, Anyone knows where in the code, i could find CBO and all it's methods? THX DotNetNuke.Common.Utilities.CBO Or if your looking for the file, try DNNRoot\Components\Shared\CBO.vb Dave...

Web resources about - DataWindow's "Create large binary/text database OLE object" - sybase.powerbuilder.datawindow

Resources last updated: 1/17/2016 6:58:55 AM