Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

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

2 posts in DataWindow Last posting was on 2009-12-07 17:01:41.0Z
pleaselogin Posted on 2009-12-07 16:53:59.0Z
From: pleaselogin <pleaselogin@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: DataWindow's "Create large binary/text database OLE object"
Date: Mon, 7 Dec 2009 08:53:59 -0800 (PST)
Organization: http://groups.google.com
Lines: 56
Message-ID: <5ecea7ed-578a-4e96-a4c6-f20f3b5f0872@a39g2000pre.googlegroups.com>
NNTP-Posting-Host: 205.200.189.2
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1260204839 23456 127.0.0.1 (7 Dec 2009 16:53:59 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 7 Dec 2009 16:53:59 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a39g2000pre.googlegroups.com; posting-host=205.200.189.2; posting-account=DKHR-QoAAADwXrdaak8WVhuQKaMgR6hL
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; MS-RTC LM 8),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!a39g2000pre.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90411
Article PK: 410017

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!


pleaselogin Posted on 2009-12-07 17:01:41.0Z
From: pleaselogin <pleaselogin@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: DataWindow's "Create large binary/text database OLE object"
Date: Mon, 7 Dec 2009 09:01:41 -0800 (PST)
Organization: http://groups.google.com
Lines: 79
Message-ID: <a31431eb-1617-40ac-8a89-d2d20e12a660@b36g2000prf.googlegroups.com>
References: <5ecea7ed-578a-4e96-a4c6-f20f3b5f0872@a39g2000pre.googlegroups.com>
NNTP-Posting-Host: 205.200.189.2
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1260205302 19597 127.0.0.1 (7 Dec 2009 17:01:42 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 7 Dec 2009 17:01:42 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: b36g2000prf.googlegroups.com; posting-host=205.200.189.2; posting-account=DKHR-QoAAADwXrdaak8WVhuQKaMgR6hL
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; MS-RTC LM 8),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!news-out.readnews.com!transit4.readnews.com!postnews.google.com!b36g2000prf.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90412
Article PK: 410013


On Dec 7, 10:53 am, 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).  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!

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

fh = FileOpen("c:\test.pdf", StreamMode!)
IF fh <> -1 THEN
FileReadEx(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"

Pardon the confusion!