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.

recevd Error Number 35 + Oleobject preparing a word document

5 posts in Objects Last posting was on 2009-06-23 21:02:33.0Z
Innovative.siva Posted on 2009-06-22 11:57:34.0Z
From: "Innovative.siva" <kaku.sivakumar@gmail.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: recevd Error Number 35 + Oleobject preparing a word document
Date: Mon, 22 Jun 2009 04:57:34 -0700 (PDT)
Organization: http://groups.google.com
Lines: 33
Message-ID: <06123ef1-72c2-4747-85f6-ce7f78e3756b@t10g2000vbg.googlegroups.com>
NNTP-Posting-Host: 155.70.23.45
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1245671855 24915 127.0.0.1 (22 Jun 2009 11:57:35 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 22 Jun 2009 11:57:35 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: t10g2000vbg.googlegroups.com; posting-host=155.70.23.45; posting-account=C3c4RwoAAAAHaGFPJdeaaBedCkYWBU4w
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB5; InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; Qwest Communications; MS-RTC LM 8; Qwest Communications),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 proxy-ne10.qintra.com:8000 (squid/2.6.STABLE17)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!t10g2000vbg.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9857
Article PK: 736986

---------------------------
System Error
---------------------------
Error Number 35.

Error text = Error calling external object function run at line 78 in
function of_createdocument of object n_cst_cobraolereportviewer..


Window/Menu/Object = n_cst_cobraolereportviewer.


Error Object/Control = n_cst_cobraolereportviewer.


Script = of_createdocument.


Line in Script = 78.
---------------------------
OK
---------------------------


Code causing this error :


//Prepare Word Document
lole_Report.Selection.TypeText(ls_ReportTitle)
lole_Report.Application.Run("Prepare_LEC_Report")


Please help


Scott Morris Posted on 2009-06-22 13:13:06.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <06123ef1-72c2-4747-85f6-ce7f78e3756b@t10g2000vbg.googlegroups.com>
Subject: Re: recevd Error Number 35 + Oleobject preparing a word document
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a3f8362@forums-3-dub.sybase.com>
Date: 22 Jun 2009 06:13:06 -0700
X-Trace: forums-3-dub.sybase.com 1245676386 10.22.241.152 (22 Jun 2009 06:13:06 -0700)
X-Original-Trace: 22 Jun 2009 06:13:06 -0700, vip152.sybase.com
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9858
Article PK: 736983

Posting the same message to multiple newsgroups independently and on
multiple days is not likely to encourage others to help. In fact, it just
may discourage them. The fact that no one has responded often indicates
that no one understands the issue or question. Perhaps now would be a good
time to provide a more complete discussion of your situation - and not just
the error message. Usually it helps to include the version and build of PB
as well as information about what "thing" you are attempting to work with
(or communicate with). Since this appears to be an OLE issue, it would be
most appropriate to post in the ole-ocx-activex NG. In addition, you appear
to be using a custom built user object which has a pfc-sounding (and
confusing) class name. We don't have your code, so you will need to provide
a bit more information than a function name and 2 lines of code.


Scott Morris Posted on 2009-06-22 13:35:06.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <06123ef1-72c2-4747-85f6-ce7f78e3756b@t10g2000vbg.googlegroups.com>
Subject: Re: recevd Error Number 35 + Oleobject preparing a word document
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a3f888a$1@forums-3-dub.sybase.com>
Date: 22 Jun 2009 06:35:06 -0700
X-Trace: forums-3-dub.sybase.com 1245677706 10.22.241.152 (22 Jun 2009 06:35:06 -0700)
X-Original-Trace: 22 Jun 2009 06:35:06 -0700, vip152.sybase.com
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9859
Article PK: 736985

Posting the same message to multiple newsgroups independently and on
multiple days is not likely to encourage others to help. In fact, it just
may discourage them. The fact that no one has responded often indicates
that no one understands the issue or question. Perhaps now would be a good
time to provide a more complete discussion of your situation - and not just
the error message. Usually it helps to include the version and build of PB
as well as information about what "thing" you are attempting to work with
(or communicate with). Since this appears to be an OLE issue, it would be
most appropriate to post in the ole-ocx-activex NG. In addition, you appear
to be using a custom built user object which has a pfc-sounding (and
confusing) class name. We don't have your code, so you will need to provide
a bit more information than a function name and 2 lines of code.


Innovative.siva Posted on 2009-06-23 08:53:32.0Z
From: "Innovative.siva" <kaku.sivakumar@gmail.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: recevd Error Number 35 + Oleobject preparing a word document
Date: Tue, 23 Jun 2009 01:53:32 -0700 (PDT)
Organization: http://groups.google.com
Lines: 166
Message-ID: <9f08d635-48a0-4cb1-989f-7f73717994ce@q16g2000yqg.googlegroups.com>
References: <06123ef1-72c2-4747-85f6-ce7f78e3756b@t10g2000vbg.googlegroups.com> <4a3f888a$1@forums-3-dub.sybase.com>
NNTP-Posting-Host: 155.70.23.45
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1245747212 16590 127.0.0.1 (23 Jun 2009 08:53:32 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 23 Jun 2009 08:53:32 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: q16g2000yqg.googlegroups.com; posting-host=155.70.23.45; posting-account=C3c4RwoAAAAHaGFPJdeaaBedCkYWBU4w
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB5; InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; Qwest Communications; MS-RTC LM 8; Qwest Communications),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 proxy-ne9.qintra.com:8000 (squid/2.6.STABLE17)
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!q16g2000yqg.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9860
Article PK: 736993


On Jun 22, 6:35 pm, "Scott Morris" <bo...@bogus.com> wrote:
> Posting the same message to multiple newsgroups independently and on
> multiple days is not likely to encourage others to help.  In fact, it just
> may discourage them.  The fact that no one has responded often indicates
> that no one understands the issue or question.  Perhaps now would be a good
> time to provide a more complete discussion of your situation - and not just
> the error message.  Usually it helps to include the version and build of PB
> as well as information about what "thing" you are attempting to work with
> (or communicate with).  Since this appears to be an OLE issue, it would be
> most appropriate to post in the ole-ocx-activex NG.  In addition, you appear
> to be using a custom built user object which has a pfc-sounding (and
> confusing) class name.  We don't have your code, so you will need to provide
> a bit more information than a function name and 2 lines of code.

My apologies for posting the same issue in all groups.

lole_Report.Application.Run("Prepare_LEC_Report")

Above line is causing the issue.


n_cst_cobraolereportviewer --> of_createdocument
************************************************************

SetPointer(HourGlass!)
/*************************************************************/
// Project: COBRA
// Event: wf_CreateDocument(long al_rownumber)
// Author: Felipe DeGuzman
// Purpose: to retrieve the report, create an MS Word document, and
// post it to the OLE Control.
// Args: an_selectedrow
// Returns ()
// Rev Date Who Notes
// COBRA4.0 12/12/97 FD New Code
// COBRA5.0 6/24/99 KL Commented progress meter scripts
//
/*************************************************************/
//Variable Declarations
String ls_TestFileName, /*Returns a string For the Word Document title
used to validate that a good connection is made to MS Word*/ &
ls_ReportTitle,ls_Return
Boolean lb_SaveAsOptions
Long ll_PercentComplete, &
ll_Rtn,ll_Return,&
ll_ReportLineCount,&
ll_Result,&
ll_ReturnFileRecordCount,&

ll_ApproxProcessTime,ll_ApproxProcessTimeMin,ll_ApproxProcessTimeSec,
&
ll_LineLow,&
ll_LineHigh,&
ll_Count
n_cst_string inv_String
n_ds lds_FileLine
Oleobject lole_Report

SetPointer(HourGlass!)

//Delete temporary files
If FileExists(is_ReportRawTextFile) then FileDelete
(is_ReportRawTextFile)
If FileExists(as_mswordtempfile) then FileDelete(as_mswordtempfile)

//Get the title of the report
ls_ReportTitle=String(al_fileid)

//Create a datastore object to retrieve data
lds_FileLine=Create n_ds
lds_FileLine.dataobject='do_returnreportfile_linebatch'
lds_FileLine.of_SetTransObject(SQLCA)


gnv_app.of_GetFrame().SetMicroHelp("Retrieving Data for Report
Display. Please wait...")

//Retrieve lines from database
ll_ReportLineCount= lds_FileLine.Retrieve(al_FileID )

//Save Datastore contents (which should be one column of report file
lines to raw text file
ll_Rtn=lds_FileLine.SaveAs( is_ReportRawTextFile, Text!, False)

////////////////////////////////////////////////
// connect to MSWord //
///////////////////////////////////////////////
ll_Result = of_ConnectToWord(lole_Report)
If ll_Result <> 0 then
destroy lole_Report
messagebox("title", "Unable to create report due to problem
connecting to Microsoft Word "+string(ll_Result), &
exclamation!, ok!)
Return ll_Result
End IF

//MS Word Command
//Activate ole_report, but keep hidden from users
//Create new word document based on COBRA Report template

lole_Report.documents.add(is_MSWordTemplateFile,False)
ls_TestFileName = lole_Report.ActiveDocument.FullName
lole_Report.Selection.GoTo(True,0,0,"report_file_contents")

gnv_app.of_GetFrame().SetMicroHelp("Preparing Report for Display.
Please wait...")

//Prepare Word Document
lole_Report.Selection.TypeText(ls_ReportTitle)


lole_Report.Application.Run("Prepare_LEC_Report")

//MS Word Command
// Import the raw data into the MS Word document at bookmark location
lole_Report.Selection.InsertFile(is_ReportRawTextFile)

// MS Word Command
// Apply text formatting for readability and replace text.
// The character string "~f" is stored in the database
// whenever a pagebreak character is encountered. The next
// command replaces the "~f" with the MS Word manual page break.

lole_Report.Application.Run("Format_LEC_Report")

//MS Word Command
//Save Temporary file that will be loaded into the OLE control
//1. First determine if user has setting to Prompt for Properties
//2. Turn off Prompt for Properties
//3. Save File as Word Document
//4. Return Original Prompt for Properties Setting
lb_SaveAsOptions =
lole_Report.Application.Options.SavePropertiesPrompt
lole_Report.Application.Options.SavePropertiesPrompt=False
lole_Report.ActiveDocument.SaveAs(as_MSWordTempFile,1)
lole_Report.Application.Options.SavePropertiesPrompt=lb_SaveAsOptions

//MS Word Command
//Make MS Word Visible
//lole_Report.Visible=True
//lole_Report.Application.Activate()

// Disconnect from Word 8 to destroy object
lole_Report.DisconnectObject()

Destroy(lole_Report)

//Delete temporary file
if FileExists(is_ReportRawTextFile) then FileDelete
(is_ReportRawTextFile)

//Return number of lines in file
return ll_ReportLineCount

************************************************************


Please let me know if you need any other info