PB Syntax for Programmable OLE Objects (Excel)
If I want to manipulate Excel (open Excel file, set value to cell, etc.), I need to write syntax like these (example):
lole_excel = create oleobject
lole_excel.ConnectToNewObject("excel.application")
lole_excel.WorkBooks.Open("C:\some_path_to\sample.xls")
lole_workbook = lole_excel.application.workbooks(1)
lole_worksheet = lole_workbook.worksheets(1)
// Set the cell value
lole_worksheet.cells(1,11).value = "Some value" //it is cells(line, column)
// Save
lole_workbook.save()
// Quit
lole_excel.application.quit()
lole_excel.DisconnectObject()
destroy lole_Excel
The question is, where should I look for complete reference of properties and function to be used?
I mean, if I want to add/embed PDF file into Excel, what function should I use? What value to pass as parameter?
What PB syntax should I code to accomplish this? Where can I find complete document for these functions/properties?
Many thanks for your attention.
How can I know that I must use worksheets property of workbooks property of application property of oleobject?
That's dependant on understanding the object model for the application that you're trying to work with. There's nothing PB documentation can really help with there.
There are a couple of sections of the Application Techniques manual that cover OLE Automation in depth:
Programmable OLE Objects
OLE Objects in Scripts
What you might find more useful in this regard though is an article I did for PBDJ, which was an excerpt from the PowerBuilder 9: Advanced Client/Server book.
What I discuss in there is how to use the object browser built into Microsoft Office products to understand the object model and how to use the functions and properties of the target application.
Similar Messages
-
OLE objects - Excel - Chart: label is missed
On generation of an Excel report, some charts are created based on some table values placing into the same book. When the chart is created, all labels appears correctly;
but when the chart is cut and pasted at the main sheet, some labels disappears from the chart. There is one label for each two ticks of the X-axis.
Somebody know how to fix this problem?How can I know that I must use worksheets property of workbooks property of application property of oleobject?
That's dependant on understanding the object model for the application that you're trying to work with. There's nothing PB documentation can really help with there.
There are a couple of sections of the Application Techniques manual that cover OLE Automation in depth:
Programmable OLE Objects
OLE Objects in Scripts
What you might find more useful in this regard though is an article I did for PBDJ, which was an excerpt from the PowerBuilder 9: Advanced Client/Server book.
What I discuss in there is how to use the object browser built into Microsoft Office products to understand the object model and how to use the functions and properties of the target application. -
Where these properities will store for an OLE object
Hi,
REPORT.
INCLUDE OLE2INCL.
TYPE-POOLS OLE2.
DATA: out TYPE ole2_object,
outmail TYPE ole2_object.
CREATE OBJECT out 'Outlook.Application'.
CALL METHOD OF out 'CREATEITEM' = outmail
EXPORTING #1 = 0.
SET PROPERTY OF outmail 'TO' = 'surya@xxzilcom' .
SET PROPERTY OF outmail 'CC' = 'fdsfs_moida@xxoocom' .
SET PROPERTY OF outmail 'SUBJECT' = 'Sending emails'.
SET PROPERTY OF outmail 'BODY' = 'this is body of the mail'.
SET PROPERTY OF OUTMAIL 'VISIBLE' = 1.
CALL METHOD OF outmail 'SEND'.
how can I find , where these properities(TO, CC, SUBJECT, BODY) are stored for a particular object.
Regards,
suryaHi Bert,
My below code is working fine but I amn't getting how can I attach a file to that mail.
Could you please tell me how can I attach a file to that mail.
REPORT.
INCLUDE OLE2INCL.
TYPE-POOLS OLE2.
DATA: out TYPE ole2_object,
outmail TYPE ole2_object.
CREATE OBJECT out 'Outlook.Application'.
CALL METHOD OF out 'CREATEITEM' = outmail
EXPORTING #1 = 0.
SET PROPERTY OF outmail 'TO' = 'surya_moida@yahoocom' .
SET PROPERTY OF outmail 'CC' = 'fdsfs_moida@yahoocom' .
SET PROPERTY OF outmail 'SUBJECT' = 'Sending emails'.
SET PROPERTY OF outmail 'BODY' = 'this is body of the mail'.
SET PROPERTY OF OUTMAIL 'VISIBLE' = 1.
CALL METHOD OF outmail 'DISPLAY'.
Regards,
Surya -
Object initializer syntax for strongly typed objects
Hi All,
In C#, you can initialize an object like this:
StudentName student = new StudentName {FirstName = "John", LastName = "Smith"};
I know that in ActionScript, I can create an object without an explicit type declaration using a similar syntax, like this:
var student:Object = {FirstName:"John", LastName:"Smith" };
But what if I wanted to strongly type the object I'm creating, like this:
var student:Student = {FirstName:"John", LastName:"Smith" };
That will fail with a compile error because I'm trying to convert a standard Object instance to a Student object instance.
Does ActionScript have a C#-like initializer syntax? Essentially, it gives you initialization constructors without you having to do the busy-work writing them. And, as an added bonus, you can initialize only the properties you want to, and you don't have to explicitly pass null for the properties you don't want to initialize.
-JoshNo such thing in AS. You could write a factory function if you want but it
won't be as efficient as constructors. -
Translation Toolkit (PB 12.5) / OLE objects binary (.udo)
There's always been an issue with using translation toolkit with objects that include OLE objects
In earlier versions of Powerbuilder, the binary data for the OLE object was found in the source code (edit source).
Powerbuilder 12.5 however, when I do edit source on a object containing OLE objects, I find the following script at the bottom:
string binarykey = "u_external_object.udo".
How may I find this binary content in the .udo file? Can't seem to find any udo files in the build directory.That is a reference to the compiled version of the object that the olecontrol is placed on. A .udo is the compiled version of a userobject inside the pbl/pbd. A .win is the compiled version of a window.
If you export your object to a .sru file, you will see the following at the end with some binary data in between the two lines.
Start of PowerBuilder Binary Data Section : Do NOT Edit
End of PowerBuilder Binary Data Section : No Source Expected After This Point
The binary data is actually stored separately in the pbl/pbd as a .bin object. Inside the pbl/pbd files nothing has changed. -
Header and footer in excel sheet (ole object)
How can we generate footer and header in an excel sheet with ole object ?
Thankshi brian,
Excel Upload Alternative - KCD_EXCEL_OLE_TO_INT_CONVERT
*Title : Excel Uploading
TYPES: BEGIN OF t_datatab,
col1(25) TYPE c,
col2(30) TYPE c,
col3(30) TYPE c,
col4(30) TYPE c,
col5(30) TYPE c,
col6(30) TYPE c,
col7(30) TYPE c,
col8(30) TYPE c,
col9(30) TYPE c,
col10(30) TYPE c,
col11(30) TYPE c,
END OF t_datatab.
DATA: it_datatab TYPE STANDARD TABLE OF t_datatab INITIAL SIZE 0,
wa_datatab TYPE t_datatab.
Data : p_table type t_datatab occurs 0 with header line.
DATA : gd_scol TYPE i VALUE '1',
gd_srow TYPE i VALUE '1',
gd_ecol TYPE i VALUE '256',
gd_erow TYPE i VALUE '65536'.
DATA: it_tab TYPE filetable,
gd_subrc TYPE i.
field-symbols : <fs>.
*Selection screen definition
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_file LIKE rlgrap-filename
DEFAULT 'c:\test.xls' OBLIGATORY. " File Name
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
REFRESH: it_tab.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Select File'
default_filename = '*.xls'
multiselection = ' '
CHANGING
file_table = it_tab
rc = gd_subrc.
LOOP AT it_tab INTO p_file.
so_fpath-sign = 'I'.
so_fpath-option = 'EQ'.
append so_fpath.
ENDLOOP.
START-OF-SELECTION.
PERFORM upload_excel_file TABLES it_datatab
USING p_file
gd_scol
gd_srow
gd_ecol
gd_erow.
END-OF-SELECTION.
END-OF-SELECTION.
LOOP AT it_datatab INTO wa_datatab.
WRITE:/ wa_datatab-col1,
wa_datatab-col2,
wa_datatab-col3,
wa_datatab-col4,
wa_datatab-col5,
wa_datatab-col6,
wa_datatab-col7,
wa_datatab-col8,
wa_datatab-col9,
wa_datatab-col10,
wa_datatab-col11.
ENDLOOP.
*& Form UPLOAD_EXCEL_FILE
upload excel spreadsheet into internal table
-->P_TABLE Table to return excel data into
-->P_FILE file name and path
-->P_SCOL start column
-->P_SROW start row
-->P_ECOL end column
-->P_EROW end row
FORM upload_excel_file TABLES p_table
USING p_file
p_scol
p_srow
p_ecol
p_erow.
DATA : lt_intern TYPE kcde_cells OCCURS 0 WITH HEADER LINE.
Has the following format:
Row number | Colum Number | Value
i.e. 1 1 Name1
2 1 Joe
DATA : ld_index TYPE i.
Note: Alternative function module - 'ALSM_EXCEL_TO_INTERNAL_TABLE'
CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
EXPORTING
filename = p_file
i_begin_col = p_scol
i_begin_row = p_srow
i_end_col = p_ecol
i_end_row = p_erow
TABLES
intern = LT_INTERN
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
FORMAT COLOR COL_BACKGROUND INTENSIFIED.
WRITE:/ 'Error Uploading file'.
EXIT.
ENDIF.
IF lt_intern[] IS INITIAL.
FORMAT COLOR COL_BACKGROUND INTENSIFIED.
WRITE:/ 'No Data Uploaded'.
EXIT.
ELSE.
SORT lt_intern BY row col.
LOOP AT lt_intern.
MOVE lt_intern-col TO ld_index.
assign component ld_index of structure
p_table to <fs>.
move : lt_intern-value to <fs>.
MOVE lt_intern-value TO p_table.
AT END OF row.
APPEND p_table.
CLEAR p_table.
ENDAT.
ENDLOOP.
ENDIF.
ENDFORM. "UPLOAD_EXCEL_FILE
thanks
abdul -
OLE objects linked to MS Word/MS Excel do not update in InfoView
I am facing the following problem:
- Embedded a Word document as linked OLE object into a crystal report and stored it to Enterprise repository.
- When opening the report with CR Developer from my workstation, links are updated and changes made in the .doc file are reflected, the report is updated
- However when displaying and refreshing the report in InfoView changes aren't reflected.
The OLE link (type document) is set to update automatically. I tried to store the report to the enterprise repository with and without data. Yet no difference - no update in either case. Neither scheduling nor opening and refreshing the report in InfoView helps.
I further inserted an OLE object linked to a bmp image, and for the image refreshing works, even in InfoView
So am I doing something wrong?
Some threads in this forum indicate that only OLE linked pictures (bmp, jpg) can be refreshed dynamically, e.g.
[Dynamically change path to OLE file]
Others indicate that it is also possible to dynamically refresh OLE objects linked to .doc, e.g.
[Re: Link to Word document doesn't refresh when running from Infoview]
- Is it at all possible to dynamically display the contents of .doc or .xls files in a CR when viewing and refreshing the report in InfoView (without the need to reopen and resave the report with CR Developer first) ?
- We are using BOE XI3.1 SP3 and Crystal Reports 2008 SP3. On the BOE server Crystal Reports Developer is not installed. Can this be a prerequisite for the OLE links to update in InfoView?
- Any other suggestions?
Thanks
KonradHi Don,
Thank you for the quick reply.
- You say that this works in CR Designer. That's right. As described above, even I can open the report with CR Designer and the links are getting updated.
- However if I do not reopen and resave the report with Designer ... if I just open and refresh the report in InfoView to get the updated information from the files ... changes are not shown. I face this problem ONLY with ole links to .doc and .exe. OLE links to image formats such as .bmp do work. WHY?
My files are already stored locally to the BO server and the (changed) image files are read and updated from exactly this directory. But not the linked Excel and Word files...
Thanks
Konrad
Edited by: Konrad Hartl on Jan 25, 2011 8:04 PM -
Truncation of leading Zeros when Down Loading into Excel - OLE Objects
Hi,
Can any one help me on this.
I am using <b>OLE Objects</b> to download Data into Excel Sheet. Data with leading Zeros is getting truncated in Excel.
Ex: Report Output is showing Plant Number as 0002. But when i am downloading to Excel Plant value will become 2 .
I would like to have it as 0002 in Excel.
I have declared Werks as CHAR of 4.I am using OLE Obects for Downloading into Excel Sheet.
I am using "OLE2_OBJECT" I can not use any other FMs to down load to Excel.As i am modifying this program not creating.
Thanks In Advance.
K.Nirmala
Message was edited by: Nirmala ReddyHi Nirmala,
While downloading to excel sheet, u need to change the number format of cell from General to Text, then leading zero's won't get deleted. For that u need to set the property of the cell. Please check this sample code,
INCLUDE OLE2INCL.
tables : zobrent.
data : it_kna1 type table of zobrent with header line.
handles for OLE objects
DATA: H_EXCEL TYPE OLE2_OBJECT, " Excel object
H_MAPL TYPE OLE2_OBJECT, " list of workbooks
H_MAP TYPE OLE2_OBJECT, " workbook
H_ZL TYPE OLE2_OBJECT, " cell
H_F TYPE OLE2_OBJECT. " font
DATA H TYPE I.
DATA: cell1 TYPE ole2_object.
*& Event START-OF-SELECTION
START-OF-SELECTION.
select * from zobrent into table it_kna1
where zopanid = '10001'
and zo_brent = '050'.
start Excel
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
PERFORM ERR_HDL.
SET PROPERTY OF H_EXCEL 'Visible' = 1.
get list of workbooks, initially empty
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
PERFORM ERR_HDL.
add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP.
PERFORM ERR_HDL.
output column headings to active Excel sheet
PERFORM FILL_CELL USING 1 1 1 'EDate'.
PERFORM FILL_CELL USING 1 2 1 'Brent'.
PERFORM FILL_CELL USING 1 3 1 'Zopanid'.
PERFORM FILL_CELL USING 1 4 1 'Contract Type'.
PERFORM FILL_CELL USING 1 5 1 'Price Type'.
PERFORM FILL_CELL USING 1 6 1 'Installation Type'.
PERFORM FILL_CELL USING 1 7 1 'Volume'.
PERFORM FILL_CELL USING 1 8 1 'AQ'.
PERFORM FILL_CELL USING 1 9 1 '00000123'.
LOOP AT IT_KNA1.
copy values to active EXCEL sheet
H = SY-TABIX + 1.
PERFORM FILL_CELL USING H 1 0 IT_KNA1-zo_effdat.
PERFORM FILL_CELL USING H 2 0 IT_KNA1-zo_brent.
PERFORM FILL_CELL USING H 3 0 IT_KNA1-zopanid.
ENDLOOP.
CALL METHOD OF h_excel 'Cells' = cell1
EXPORTING
#1 = 1
#2 = 1.
FREE OBJECT H_EXCEL.
PERFORM ERR_HDL.
if sy-subrc eq 0.
write : / 'year'(001).
endif.
FORM FILL_CELL
sets cell at coordinates i,j to value val boldtype bold
FORM FILL_CELL USING I J BOLD VAL.
CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
PERFORM ERR_HDL.
GET PROPERTY OF H_ZL 'Font' = H_F.
PERFORM ERR_HDL.
SET PROPERTY OF H_F 'Bold' = BOLD .
PERFORM ERR_HDL.
***Changing the format of the cell from General to Text
<b>SET PROPERTY OF H_ZL 'NumberFormat' = '@'.</b>
PERFORM ERR_HDL.
SET PROPERTY OF H_ZL 'Value' = VAL .
PERFORM ERR_HDL.
ENDFORM.
*& Form ERR_HDL
FORM ERR_HDL.
IF SY-SUBRC <> 0.
WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
STOP.
ENDIF.
ENDFORM. " ERR_HDL
U just paste this code in a sample program & see.
Please reward, if found helpful. -
Opening Linked Excel OLE Objects in Forms 6i
Hi,
I have a linked Excel OLE object which is populating properly into an OLE container. However, I cannot open the file to save a local copy, as I would a non-linked Excel OLE object. If I right-click on the linked OLE object choose copy, I can paste the data into a spreadsheet, but it appears as an image, rather than as regular tabulated data. Is there anyway to open the file normally?
Thanks in advance.Hi Shay,
Thanks for the reply but i was unable to register to metalink. they need some support agreement code which i do not have. Can you please give me some more information on how to use that.
waiting for an early reply.
Warm Regards
Vivek Bajaj -
OLE for transfer data to excel
Hi
Can any one send me the coding to use ole for sending data from a multirecord form to excel?
I have never used OLE.
i am using DDE package for this task but its very slow.
regards,
adeelHi Adeel
Here's some code to dump the contents of a block into Excel. You may want to uncomment the commented-out sections if you want the functionality of being able to save the workbook that gets created. (I copied it a while back from this forum, so am not claiming any credit for it, or for the lack of readability!!)
Best regards
Andrew
PROCEDURE pr_Forms_to_Excel(p_block_name IN VARCHAR2 DEFAULT NAME_IN('system.current_block')) IS
-- Declare the OLE objects
application OLE2.OBJ_TYPE;
workbooks OLE2.OBJ_TYPE;
workbook OLE2.OBJ_TYPE;
worksheets OLE2.OBJ_TYPE;
worksheet OLE2.OBJ_TYPE;
cell OLE2.OBJ_TYPE;
range OLE2.OBJ_TYPE;
range_col OLE2.OBJ_TYPE;
-- Declare handles to OLE argument lists
args OLE2.LIST_TYPE;
-- Declare form and block items
form_name VARCHAR2(100);
f_block VARCHAR2(100);
l_block VARCHAR2(100);
f_item VARCHAR2(100);
l_item VARCHAR2(100);
cur_block VARCHAR2(100) := NAME_IN('system.current_block');
cur_item VARCHAR2(100) := NAME_IN('system.current_item');
cur_record VARCHAR2(100) := NAME_IN('system.cursor_record');
item_name VARCHAR2(100);
baslik VARCHAR2(100);
row_n NUMBER;
col_n NUMBER;
filename VARCHAR2(100);
BEGIN
-- Start Excel
application:=OLE2.CREATE_OBJ('Excel.Application');
OLE2.SET_PROPERTY(application, 'Visible', 'True');
-- Return object handle to the Workbooks collection
workbooks:=OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
-- Add a new Workbook object to the Workbooks collection
workbook:=OLE2.GET_OBJ_PROPERTY(workbooks,'Add');
-- Return object handle to the Worksheets collection for the Workbook
worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
-- Get the first Worksheet in the Worksheets collection
-- worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 1);
worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Item',args);
OLE2.DESTROY_ARGLIST(args);
-- Return object handle to cell A1 on the new Worksheet
go_block(p_block_name);
baslik := get_block_property(p_block_name,FIRST_ITEM);
f_item := p_block_name||'.'||get_block_property(p_block_name,FIRST_ITEM);
l_item := p_block_name||'.'||get_block_property(p_block_name,LAST_ITEM);
first_record;
LOOP
item_name := f_item;
row_n := NAME_IN('SYSTEM.CURSOR_RECORD');
col_n := 1;
LOOP
IF get_item_property(item_name,ITEM_TYPE)<>'BUTTON' AND
get_item_property(item_name,VISIBLE)='TRUE'
THEN
-- Set first row with the item names
IF row_n=1 THEN
baslik:=NVL(get_item_property(item_name,PROMPT_TEXT),baslik);
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(cell, 'Value', baslik);
OLE2.RELEASE_OBJ(cell);
END IF;
-- Set other rows with the item values
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n+1);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
IF get_item_property(item_name,DATATYPE)<>'NUMBER' THEN
OLE2.SET_PROPERTY(cell, 'NumberFormat', '@');
END IF;
OLE2.SET_PROPERTY(cell, 'Value', name_in(item_name));
OLE2.RELEASE_OBJ(cell);
END IF;
IF item_name = l_item THEN
exit;
END IF;
baslik := get_item_property(item_name,NEXTITEM);
item_name := p_block_name||'.'||get_item_property(item_name,NEXTITEM);
col_n := col_n + 1;
END LOOP;
EXIT WHEN NAME_IN('system.last_record') = 'TRUE';
NEXT_RECORD;
END LOOP;
-- Autofit columns
range := OLE2.GET_OBJ_PROPERTY( worksheet,'UsedRange');
range_col := OLE2.GET_OBJ_PROPERTY( range,'Columns');
OLE2.INVOKE( range_col,'AutoFit' );
OLE2.RELEASE_OBJ( range );
OLE2.RELEASE_OBJ( range_col );
-- Get filename and path
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args, p_block_name );
OLE2.ADD_ARG( args,'Excel Workbooks (*.xls, *.xls');
filename := OLE2.INVOKE_CHAR( application,'GetSaveAsFilename',args );
OLE2.DESTROY_ARGLIST( args );
-- Save as worksheet
IF NVL(filename,'0')<>'0' THEN
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args,filename );
OLE2.INVOKE( worksheet,'SaveAs',args );
OLE2.DESTROY_ARGLIST( args );
END IF;
-- Close workbook
--OLE2.INVOKE( workbook ,'Close');
-- Release the OLE objects
OLE2.RELEASE_OBJ(worksheet);
OLE2.RELEASE_OBJ(worksheets);
OLE2.RELEASE_OBJ(workbook);
OLE2.RELEASE_OBJ(workbooks);
--OLE2.INVOKE(application, 'Quit');
OLE2.RELEASE_OBJ(application);
-- Focus to the original location
go_block(cur_block);
go_record(cur_record);
go_item(cur_block||'.'||cur_item);
END; -
FRM-41344 - OLE object not defined for CONTROL_OLE in the current record
Hi!
I am working in a multirecord block, and I need to obtain data from a Weighing System on each record. But this error appears in run time: FRM-41344 - OLE object not defined for CONTROL_OLE in the current record.
I use the same in other program, but in that case is a single record block.
Can somebody help me?Hi;
For your issue i suggest close your thread here as changing thread status to answered and move it to Forum Home » Application Development in PL/SQL » Forms which is dedicated forum site
Regard
Helios -
Syntax check for inactive programs(object)
I am having some program in internal table now i have to do syntax check for the programs, actually I can use SLIN but SLIN will not do Syntax check if the object is not active, is there any way that I can check for many programs one after the other.
Hi Vikram,
USe the transaction SAMT.
Please flooow the link below it will solve u r pblm.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40c62223-639e-2a10-dd9a-b1dd9af73aeb
Thanks -
I am trying to use the Command Object create a recordset
where a variable is passed that contains the values of in IN
statement:
Param5 rsOffices__varType is the variable that passes the
value of the IN
If I set rsOffices__varType = 'po', 'sb' : I do not get en
error, but I also do not return any records
If I set rsOffices__varType = po', 'sb : No error, No records
If I set rsOffices__varType = "'po', 'sb'" : No error, No
records
If I set rsOffices__varType = ""po"", ""sb"" : No error, No
records
Same is true of several other combinations of single and
double quotes: No error, No records
What is the correct syntax for a the parameter that is used
in the "IN" statement?
Dim rsOffices
Dim rsOffices_cmd
Dim rsOffices_numRows
Set rsOffices_cmd = Server.CreateObject ("ADODB.Command")
rsOffices_cmd.ActiveConnection = MM_connClusterDB_STRING
rsOffices_cmd.CommandText = "SELECT OfficeID, ShortOffice,
MasterType, TypeCode, ZipTag FROM tbl_Offices WHERE ShortOffice
like ? and MasterType = ? and ZipTag between ? and ? and
TypeCode in ( ? ) "
rsOffices_cmd.Prepared = true
rsOffices_cmd.Parameters.Append
rsOffices_cmd.CreateParameter("param1", 200, 1, 50,
rsOffices__varOff) ' adVarChar
rsOffices_cmd.Parameters.Append
rsOffices_cmd.CreateParameter("param2", 200, 1, 10,
rsOffices__varMaster) ' adVarChar
rsOffices_cmd.Parameters.Append
rsOffices_cmd.CreateParameter("param3", 3, 1, 4,
rsOffices__varZip1) ' adInteger
rsOffices_cmd.Parameters.Append
rsOffices_cmd.CreateParameter("param4", 3, 1, 4,
rsOffices__varZip2) ' adInteger
rsOffices_cmd.Parameters.Append
rsOffices_cmd.CreateParameter("param5", 200, 1, 50,
rsOffices__varType) ' adVarChar
Set rsOffices = rsOffices_cmd.ExecuteWhat is the correct systax for defining an object
using an array;
i.e.,
To create an array of 3 Books objects from:
private Book book1;
private Book book2;
private Book book3;
to an array, what would the syntax look like?
Book[] library= { book1, book2, book3 };
//or, (valid but less idiomatic)
Book library[]= { book1, book2, book3 );
//or, quite silly
Book[] library= new Book[3];
library[0]= book1;
library[1]= book2;
library[2]= book3;kind regards -
What is the alternate for OLE object in 10g
Hi all
I am migrating forms 6i to 10g...
They are some ole objects in the forms.
while migrating using form migration tool.... it is giving a message that OLE built in's are obsolete...
What i need to do in 10g to replace OLE's functionality????
Please help in this???
ThanksHello,
<p>The Webutil library has a OLE2 client sode equivalent</p>
Francois -
Ole object missing on pdf file
i have long raw field in database. i am saving excel workbook in it through ole container. it displays well on report but when i generate pdf from report it miss ole field and show that portion of report blank. It exports ole object in postscript format (.eps) but i dont now any software which can open this file and show result on screen.
i am using developer 6i with oracle 9i database in client-server environment.
thanksHello,
Take a look to the thread :
Re: Image in Reports
eps files are "Encapsulated PostScript", for more details :
http://www.tailrecursive.org/postscript/eps.html
for example
Regards
Maybe you are looking for
-
Photoshop CS4 in Windows 7 bug runing batch actions
I been using Photoshop CS4 in Vista with no problems, but now my problem is when I installed windows 7 and opened 60 photos and apply an action and try to do other things while PS is working in the batch, when I try to change to other window I get ba
-
Moving a number from account to prepaid
I have a specific situation when I need to keep the same number on a phone, but with my current AT&T Next plan it makes no sense to keep it in my family account. I turns out that it is tricky, since I have combined billing and don't want to lose it.
-
Need help in Exporting list to memory and return in background
Hello Experts, I have a program which reads data from mc.9 by exporting list to memory.When I run it in foreground its working fine . However if I schedule it as a background program it is unable to get list from memory. Any help will be appreciable
-
I do, my ipod just stays on the screen of the apple
I do, my ipod just stays on the screen of the apple
-
FND Server Security (Authentication) enabled?
Hi Guys, How to check the "FND Server Security (Authentication)" is enabled? Apps 11i DB: 10g OS: HP-UX Thanks,