Oracle Replication - Encrypted Data and Oracle Data Guard
We are working on a high availability architecture for one of our new projects. The preliminary architecture has Oracle 10g Release 2(10.2.0.2) production database (primary database) running on Solaris10 server for OLTP operations. And a production replicated database (standby database) is running on another node running on Solaris10 server for reporting, ETL data extractions etc. The plan is to implement Oracle data guard (DG) to replicate data between primary database and standby database (logical standby database). As a side note, there is going to be one to two minute time log for data synchronization between primary and standby databases.
We need to encrypt sensitive data (like SSN, Credit Card No. etc) in the primary production database. Initially we thought this can be achieved by using Oracle Transparent Data Encryption (TDE), this is a new encryption method Oracle came up with their 10g version. But the issue here is Oracle TDE doesnt support setting up the logical standby database (using Oracle data Guard) for reporting on the second node. I have confirmed with Oracle on this, so we are kind of stuck in the middle on this new requirement. So our next option is to look out for any third party vendors who can resolve this puzzle, and looking for your help for any suggestions.
· Do you know any vendor who can support both data encryption and data replication for Oracle databases?
· Do you know any vendor who can support just data encryption for Oracle databases?
(I am thinking if we can find a vendor, we would like to ask them if they have any technical issues working with Oracle data guard for data replication and use some kind of technique to decrypt the data on the standby/reporting database.)
You can always use the DBMS_CRYPTO or DBMS_OBFUSCATION_TOOLKIT to encrypt the data rather than using TDE. You may have to do some work on the key management side, though, but it shouldn't be too painful.
Justin
Similar Messages
-
UNDERSTAND THE NEW DATE AND TIME DATA TYPES IN ORACLE 9I
제품 : SQL*PLUS
작성날짜 : 2001-08-01
UNDERSTAND THE NEW DATE AND TIME DATA TYPES IN ORACLE 9I
========================================================
PURPOSE
Oracle 9i 에서 소개되는 새로운 datetime data type 에 대해 소개한다.
Explanation
Example
1. Datetime Datatypes
1) TIMESTAMP
: YEAR/MONTH/DAY/HOUR/MINUTE/SECOND
2) TIMESTAMP WITH TIME ZONE
: YEAR/MONTH/DAY/HOUR/MINUTE/SECOND/
TIMEZONE_HOUR/TIMEZONE_MINUTE( +09:00 )
or TIMEZONE_REGION( Asia/Seoul )
3) TIMESTAMP WITH LOCAL TIME ZONE
: YEAR/MONTH/DAY/HOUR/MINUTE/SECOND
4) TIME WITH TIME ZONE
: HOUR/MINUTE/SECOND/TIMEZONE_HOUR/TIMEZONE_MINUTE
2. Datetime Fields
1) YEAR/MONTH/DAY/HOUR/MINUTE
2) SECOND(00 to 59.9(N) is precision) : Range 0 to 9, default is 6
3) TIMEZONE_HOUR : -12 to 13
4) TIMEZONE_MINUTE : 00 to 59
5) TIMEZONE_REGION : Listed in v$timezone_names
3. DATE 와 TIMESTAMP 와의 차이점
SQL> select hiredate from emp;
HIREDATE
17-DEC-80
20-FEB-81
SQL> alter table employees modify hiredate timestamp;
SQL> select hiredate from employees;
HIREDATE
17-DEC-80 12.00.00.000000 AM
20-FEB-81 12.00.00.000000 AM
단, 해당 Column 에 Data 가 있다면 DATE/TIMESTAMP -> TIMESTAMP WITH
TIME ZONE 으로 Convert 할 수 없다.
SQL> alter table employees modify hiredate timestamp with time zone;
alter table employees modify hiredate timestamp with time zone
ERROR at line 1:
ORA-01439: column to be modified must be empty to change datatype
4. TIMESTAMP WITH TIME ZONE Datatype
TIMESTAMP '2001-05-24 10:00:00 +09:00'
TIMESTAMP '2001-05-24 10:00:00 Asia/Seoul'
TIMESTAMP '2001-05-24 10:00:00 KST'
5. TIMESTAMP WITH LOCAL TIME ZONE Datatype
SQL> create table date_tab (date_col TIMESTAMP WITH LOCAL TIME ZONE);
SQL> insert into date_tab values ('15-NOV-00 09:34:28 AM');
SQL> select * from date_tab;
DATE_COL
15-NOV-00 09.34.28.000000 AM
SQL> alter session set TIME_ZONE = 'EUROPE/LONDON';
SQL> select * from date_tab;
DATE_COL
15-NOV-00 12.34.28.000000 AM
6. INTERVAL Datatypes
1) INTERVAL YEAR(year_precision) TO MONTH
: YEAR/MONTH
: Year_precision default value is 2
SQL> create table orders (warranty interval year to month);
SQL> insert into orders values ('2-6');
SQL> select warranty from orders;
WARRANTY
+02-06
2) INTERVAL DAY (day_precision) TO SECOND (fractional_seconds_precision)
: DAY/HOUR/MINUTE/SECOND
: Logon time 확인시 주로 사용
: day_precision range 0 to 9, default is 2
SQL> create table orders (warranty interval day(2) to second);
SQL> insert into orders values ('90 00:00:00');
SQL> select warranty from orders;
WARRANTY
+90 00:00:00.000000
7. Interval Fields
- YEAR : Any positive or negative integer
- MONTH : 00 to 11
- DAY : Any positive or negative integer
- HOUR : 00 to 23
- MINUTE : 00 to 59
- SECOND : 00 to 59.9(N) where 9(N) is precision
8. Using Time Zones
1) Database operation
- Defined at CREATE DATABASE
- Can be altered with ALTER DATABASE
- Current value given by DBTIMEZONE
2) Session operation
- Defined with environment variable ORA_SDTZ
- Can be altered with ALTER SESSION SET TIME_ZONE
- Current value given by SESSIONTIMEZONE
3) TIMESTAMP WITH LOCAL TIMEZONE
- TIME_ZONE Session parameter
: O/S Local Time Zone
Alter session set time_zone = '-05:00';
: An absolute offset
Alter session set time_zone = dbtimezone;
: Database time zone
Alter session set time_zone = local;
: A named region
Alter session set time_zone = 'America/New_York';
Reference Document
------------------Hi ,
I am facing the same problem and my scenario is also same (BAPI's).
So can you please tell me how you overcome this problem .
Thanks,
Rahul -
Hi Experts,
We have a requirement to fetch the value of 'No of days' between Invoice date and due date (Two variable date fields on the template) in an Analysis.
Please let me know the procedure of how to achieve the same.
Regards,
Revit's good for ideas but implementation a bit different
Oracle Business Intelligence Publisher Report Designer's Guide
This function provides a method to get the difference between two dates in the given locale. The dates need to be in "yyyy-MM-dd" format. This function supports only the Gregorian calendar. The syntax is as follows:
<?xdoxslt:date_diff(‘format’, ‘YYYY-MM-DD’, ‘YYYY-MM-DD’, $_XDOLOCALE, $_XDOTIMEZONE)?>
where
format is the time value for which the difference is to be calculated
Example:
<?xdoxslt:date_diff(‘d’, ‘2006-04-08’, ‘2006-04-01’, $_XDOLOCALE, ‘America/Los_Angeles’)?>
returns
-7 -
Master Data and Transaction Data For DB Connect extracted Data...
Dear Experts,
I have been working on SAP NetWeaver BW 7.3 and for the first time I have extracted data from Oracle DBMS by using DB Connect. I have successfully extracted data of a View namely Sales_View into BW by creating a DataSource. This View has about 100 fields and I have been told that this view consists of Master Data and Transaction Data too. For my further reporting needs say building a Dashboard or InfoSpace I have to design a DSO and InfoCube for this DataSource. I'm bit confused about the Master Data and Transaction Data of this DataSource.
1. Should I create all custom InfoObject against all fields of DataSource for DSO and InfoCube design?
2. Do I need to create and load the Master Data for all InfoObjects or I need to create or load the Master Data for only those InfoOjects which will be
used for drill down or reporting in Dashboard or InfoSpace?
3. Do I need to load the Master Data manually by creating Flat Files and using these files for Master Data loading for required objects?
4. How should I approach the designing of DSO and InfoCube?
I will appreciate your inputs in this matter.
Many thanks!
Tariq AshrafThanks!
-
Search on basis of start date and end date
Hi,
I have added two fields 'Start Date' and 'End Date' on a search page.
I have done the VO extension also.
Now, I have to implement search logic to get all the records created in between 'Start Date' and 'End Date' after pressing the 'GO' button on that page.
Can anyone please provide guidance to extend the controller.
Thanks in advance.
Gaurav.Hi Anil,
Thanks for ur reply.
As per the link, I have written following code in the controller :
package oracle.apps.irc.vacancy.webui;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.table.OAAdvancedTableBean;
public class xxVacancyCriteriaCO extends VacancyCriteriaCO
public xxVacancyCriteriaCO() {}
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
// Pressing the Go button causes the search to be executed.
OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
OAViewObject oaviewobject = (OAViewObject)am.findViewObject("XXIrcVacancySearchCriteriaVO");
if (pageContext.getParameter("Go") != null)
String created = pageContext.getParameter("ViewDate");
oaviewobject.setWhereClauseParam(0, created);
oaviewobject.executeQuery();
OAAdvancedTableBean table = (OAAdvancedTableBean)webBean.findChildRecursive("ResultsTable");
table.queryData(pageContext, false);
But while compiling it, I am getting the error as :
"Error(14,42): PerTransactionTopCOImpl not found in class oracle.apps.irc.common.webui.IrcOAControllerImpl in class oracle.apps.irc.vacancy.webui.VacancyCriteriaCO in class oracle.apps.irc.vacancy.webui.xxVacancyCriteriaCO"
Can u please suggest where the mistake is?
Thanks again.
Gaurav.
Edited by: Gaurav on Jan 14, 2011 12:51 AM -
EBS data and meta data retrieval
Hi,
I am into java and my requirement is to retrieve data and meta data of the underlying EBS implementation and make it available to the EBS end users for some kind of processing which is outside EBS.With my limited knowledge of EBS,what I understand is that there is a logical view and a physical view of the data.My queries are as below:-
1. Is there a way to get the relationship between physical and logical view?
2. How to get the meta data of the underlying table structures?
3. Should JDBC drivers be sufficient to retrieve the data or is there any other more efficient means of retrieval.
Any help on the same is appreciated as I am new into this area and any help is welcome.
Thanks
MNGHi,
1. Is there a way to get the relationship between physical and logical view?
2. How to get the meta data of the underlying table structures?See Oracle eTRM website.
eTRM
https://etrm.oracle.com
3. Should JDBC drivers be sufficient to retrieve the data or is there any other more efficient means of retrieval. I believe using JDBC drivers should be sufficient. For using JDeveloper, please see (Note: 330236.1 - Configuring JDeveloper For Use With Oracle Applications 11i and R12).
Regards,
Hussein -
What is the Difference Between Sys Date and Effective Date ??
Hi Gurus,
Can any one pls let me know What is the Difference Between Sys Date and Effective Date ??
with regards
User600722EFFECTIVE DATE usually refers to a date-tracked record (although not exclusively).
Date-tracked records in Oracle HR have an EFFECTIVE START DATE and an EFFECTIVE END DATE. The record is 'EFFECTIVE' between these dates. In reports, you often use SYSDATE to compare to these two dates to find the CURRENT effective record, e.g. SYSDATE BETWEEN EFFECTIVE START DATE AND EFFECTIVE END DATE.
When you make changes to a HR record, you can choose between DATE TRACKING options, such as CORRECT or UPDATE (there are others too). CORRECT will overwrite the record and replace the data with your changes. This is normally used when you need to correct something that is wrong. UPDATE will create a new version of the record from the EFFECTIVE START DATE you choose. It will also set the EFFECTIVE END DATE of the previous record to the day before your new record's EFFECTIVE START DATE. That enables a history of records to be maintained so you can see what your data looked like at ay one point in time.
Regards
Tim
Edited by: TimW on Sep 23, 2008 2:37 PM -
The Difference between "Cell Data" and "Dimension Data"?
What is the difference between the tab "Cell Data" and "Dimension Data" in SSAS?
Article quote: " SSAS provides the way to secure analysis services database/cube data from unauthorized access. Analysis services provides secure access by creating object called "roles". After creation of role, user's windows login credential can be used
to enroll into particular role because analysis services identifies user from their windows login credentials . You can protect your data in roles at two levels:
1) Dimension level
2) Cell level
If user has been assigned more than one role, analysis services loop through all assigned roles after login. Analysis services finds all permission level for the particular user and union all the permission levels.
If two roles has contradictory access for user then particular access will be allowed. Suppose role1 says Australia data access and role2 denies Australia data access then access to Australia data will be allowed. "
LINK:
http://www.msbiconcepts.com/2010/10/ssas-data-security-dimension-and-cell.html
Kalman Toth Database & OLAP Architect
IPAD SELECT Query Video Tutorial 3.5 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Diff B/W master data and transaction data
Hi all,
What is the main Diff B/W master data and transaction data. give me some example ?
Thanks in Advance
Krish...hi krish,
MASTER Data is the data that exists in the organization like employee details, material master, customer master, vendor master etc. These are generally created once.
Master data are distributed throughout the company, they are often not standardised and often redundant. As a result it is very costly to offer efficient customer service, keep track of supply chains and make strategic decisions. With SAP Master Data Management (SAP MDM) these important business data from across the company can be brought together, harmonised and made accessible to all staff and business partners. As a key component of SAP NetWeaver, SAP MDM ensures data integrity via all IT systems.
Regardless of the industry, companies often work with different ERP and Legacy systems. The result: the business processes are based on information about customers, partners and products which is displayed in different ways in the systems. If the data are recorded manually, there are more inconsistencies: some data sets are entered several times, others cannot be retrieved by all divisions of the company.
As corporate applications are becoming increasingly complex and produce ever greater amounts of data, the problem is intensified further. Nevertheless, your employees must work with the inconsistent data and make decisions on this basis. The lack of standardised master data easily leads to wrong decisions, which restrict efficiency and threaten customer satisfaction and profitability.
In a word: in order to save costs and ensure your companys success it is necessary to consolidate master data about customers, partners and products, make them available to all employees beyond system boundaries and use attributes valid company-wide for the purpose of description.
TRASNACTION Data - These are the business documents that you create using the master data - Purchase orders, sales orders etc
http://help.sap.com/saphelp_nw2004s/helpdata/en/9d/193e4045796913e10000000a1550b0/content.htm
Regards,
GNK. -
Oracle Single Sign on and Oracle Internet Directory
Hello Gurus,
What is the relationship between Oracle Single Sign on and Oracle Internet Directory.
To my understanding, OID is required to install SSO.
If OID already exist, can we just install SSO and go on integrating it to existing OID.
Great Thanks,
vimal jain.
[email protected]Hi Tim,
I've been working on this and could reproduce the issue with anonymous binds. A fix will be ready in 4.2.1.
So what I really need is the password used for login to pass to the is_member call.The P101_PASSWORD item does not save state. However, you can access the value during submit processing of the login page, for example in the post authentication function of your authentication scheme. People sometimes put code in there to query the user's groups (e.g. with apex_ldap.member_of2) and save them in an application. This item value can then be used in the authorization schemes.
Regards,
Christian -
Regarding : Material document data and PO data do not match (Plant)
Hi Gurus,
Please go through this BAPI program.
While uploading it is giving an error ' Material document data and PO data do not match (Plant) '.
Please help regarding this issue.For all Other moment types it is working fine except this 351 moment type.
dATA: i_excel TYPE truxs_t_text_data. "work table for excel upload
DATA: BEGIN OF it_itab OCCURS 100,
docdate(10),
postdate(10),
mvt_type(3), "Movement Type
plant(4), "Plant
lgort(4),
pur_doc(10), "Purchase Document No
po_item(3), "Purchase Document Item No
material(18), "Material Number
delnote(16),
erfmg(13),
uom(3),
lfmng(13), "Quantity
batch(10) TYPE c,
vfdat TYPE vfdat,
END OF it_itab.
DATA: it_goodsmvt_head TYPE TABLE OF bapi2017_gm_head_01 INITIAL SIZE 100,
it_goodsmvt_code TYPE TABLE OF bapi2017_gm_code INITIAL SIZE 100,
it_goodsmvt_item TYPE TABLE OF bapi2017_gm_item_create INITIAL SIZE 100.
DATA: wa_goodsmvt_head LIKE LINE OF it_goodsmvt_head,
wa_goodsmvt_code LIKE LINE OF it_goodsmvt_code,
wa_goodsmvt_item LIKE LINE OF it_goodsmvt_item.
DATA: w_mat_doc TYPE bapi2017_gm_head_ret-mat_doc,
w_year TYPE bapi2017_gm_head_ret-doc_year.
DATA: BEGIN OF it_errmsg_goodsmvt OCCURS 10.
INCLUDE STRUCTURE bapiret2.
DATA: END OF it_errmsg_goodsmvt.
DATA : obj_type LIKE bapiache09-obj_type,
obj_key LIKE bapiache09-obj_key,
obj_sys LIKE bapiache09-obj_sys.
DATA: v_date1 TYPE sy-datum.
DATA: v_date2 TYPE sy-datum.
DATA: w_lines TYPE i.
DATA: errflag.
SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-100.
PARAMETERS: p_file TYPE rlgrap-filename.
SELECTION-SCREEN END OF BLOCK bk1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
Start-of-selection processing
START-OF-SELECTION.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_line_header = 'X'
i_tab_raw_data = i_excel
i_filename = p_file
TABLES
i_tab_converted_data = it_itab[]
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT it_itab.
REFRESH it_goodsmvt_head.
REFRESH it_goodsmvt_item.
CONCATENATE it_itab-docdate6(4) it_itab-docdate3(2) it_itab-docdate+0(2) INTO v_date1.
CONCATENATE it_itab-postdate6(4) it_itab-postdate3(2) it_itab-postdate+0(2) INTO v_date2.
wa_goodsmvt_head-pstng_date = v_date2.
wa_goodsmvt_head-doc_date = v_date1.
wa_goodsmvt_head-ref_doc_no = it_itab-delnote.
wa_goodsmvt_head-pr_uname = sy-uname.
APPEND wa_goodsmvt_head TO it_goodsmvt_head.
Maintain it_goodsmvt_code
wa_goodsmvt_code-gm_code = '04'.
Maintain it_goodsmvt_item
*LOOP AT it_itab.
IF wa_goodsmvt_item-po_number IS INITIAL.
wa_goodsmvt_item-po_number = it_itab-pur_doc.
wa_goodsmvt_item-move_type = it_itab-mvt_type.
wa_goodsmvt_item-MOVE_PLANT = it_itab-plant.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = it_itab-material
IMPORTING
output = it_itab-material.
wa_goodsmvt_item-material = it_itab-material.
wa_goodsmvt_item-stge_loc = it_itab-lgort.
wa_goodsmvt_item-po_item = it_itab-po_item.
wa_goodsmvt_item-entry_qnt = it_itab-erfmg.
wa_goodsmvt_item-ENTRY_UOM_ISO = it_itab-uom.
wa_goodsmvt_item-po_pr_qnt = it_itab-lfmng.
wa_goodsmvt_item-batch = it_itab-batch.
wa_goodsmvt_item-expirydate = it_itab-vfdat.
wa_goodsmvt_item-NO_MORE_GR = 'X'.
wa_goodsmvt_item-mvt_ind = 'B'.
APPEND wa_goodsmvt_item TO it_goodsmvt_item.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = wa_goodsmvt_head
goodsmvt_code = wa_goodsmvt_code
IMPORTING
materialdocument = w_mat_doc
TABLES
goodsmvt_item = it_goodsmvt_item
return = it_errmsg_goodsmvt.
Process of commit work
IF it_goodsmvt_head[] IS NOT INITIAL.
DESCRIBE TABLE it_goodsmvt_head LINES w_lines.
ENDIF.
IF it_goodsmvt_item[] IS NOT INITIAL.
DESCRIBE TABLE it_goodsmvt_item LINES w_lines.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
IMPORTING
RETURN =
CLEAR errflag.
READ TABLE it_errmsg_goodsmvt INDEX 1.
IF it_errmsg_goodsmvt-type EQ 'E'.
WRITE:/'Error in function', it_errmsg_goodsmvt-message.
errflag = 'X'.
ELSE.
WRITE:/ it_errmsg_goodsmvt-message.
ENDIF.
IF errflag IS INITIAL.
COMMIT WORK AND WAIT.
IF sy-subrc NE 0.
WRITE:/ 'Error in updating'.
EXIT.
ELSE.
WRITE:/ 'Material Document created successfully and the Document Number for the Material',
wa_goodsmvt_item-material,'is:', w_mat_doc, w_year.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.Hey,
Just wanted to post that in my case this was the error of MVT_IND field in item table. When I made it from 'B' to blank then it worked.
Mine is solved....
Thanks -
Downloding the SAP master data and transaction data to a flat file
Hello All,
Is there any SAP standard method or transaction to download the SAP master data and transaction data to flat file.
With out using ABAP development, SAP had provided any tool or method to download the SAP system master and transaction data to flat file.
Thanks,
Feroz.hi
as of now up to my knowledge no. -
Default key date, Document date and posting date needs to be changed automa
Hi Experts,
The user wants to create a variant for Foreign currency valuation, wherein the default key date, Doc date and Posting date needs to be changed every month automatically. Is it possible?
Please let me know your thoughts.
Warm regards,
Murukan ArunachalamHi
Please follow this process.
Only specify fields that should be changed
Select these fields by entering an X in the checkboxes
Enter a U in the UPDATEFLAG field
Always specify key fields when changing the data, including in the checkboxes
The configuration is an exception here. If this needs to be changed, you need to complete it again fully.
Maintain quantities and dates in the schedule line data.
1. Minimum entry:
You must enter the order number in the SALESDOCUMENT structure.
You must always enter key fields for changes.
You must always specify the update indicator in the ORDER_HEADER_INX.
2. Commit control:
The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI. -
I use a translation stage for the experiment.For each user in the lab the stage position (to start an experiment) is different.I defined one end of the stage as zero. I want to save the position , date and time of the stage with respect to zero.I want all these in one file, nd everytime I run it it should save to the same file, like this:
2/12/03 16:04 13567
2/13/03 10:15 35678
So I will track the position from day to day.If naybody helps, I appreciate it.Thanks.evolution wrote in message news:<[email protected]>...
> How can I save my data and the date,the time into the same file when
> I run this VI at different times?
>
> I use a translation stage for the experiment.For each user in the lab
> the stage position (to start an experiment) is different.I defined one
> end of the stage as zero. I want to save the position , date and time
> of the stage with respect to zero.I want all these in one file, nd
> everytime I run it it should save to the same file, like this:
> 2/12/03 16:04 13567
> 2/13/03 10:15 35678
>
> So I will track the position from day to day.If naybody helps, I
> appreciate it.Thanks.
Hi,
I know the function "write to spreadsheet file.vi"
can append the data
to file. You can use the "concatenate strings" to display the date,
time as well as data... Hope this help.
Regards,
celery -
Hope someone can help. I have tried to find the best way to do this and can't seem to make sense of anything. I'm using an Access 2013 Database and I have a report that is based on a query. I've created a Report Criteria Form. I
need the user to be able to select multiple items in a list box and also to enter a Begin Date and End Date. I then need my report to return only the records that meet all selected criteria. It works fine with a ComboBox and 1 selection but can't
get it to work with a List Box so they can select multiple items. Any help is greatly appreciated while I still have hair left.The query should return all records.
Let's say you have the following controls on your report criteria form:
txtStart: text box, formatted as a date.
txtEnd: text box, formatted as a date.
lbxMulti: multi-select list box.
cmdOpenReport: command button used to open the report.
The text boxes are used to filter the date/time field DateField, and the list box to filter the number field SomeField.
The report to be opened is rptReport.
The On Click event procedure for the command button could look like this:
Private Sub cmdOpenReport_Click()
Dim strWhere As String
Dim strIn As String
Dim varItm As Variant
On Error GoTo ErrHandler
If Not IsNull(Me.txtStart) Then
strWhere = strWhere & " AND [DateField]>=#" & Format(Me.txtStart, "yyyy-mm-dd") & "#"
End If
If Not IsNull(Me.txtEnd) Then
strWhere = strWhere & " AND [DateField]<=#" & Format(Me.txtEnd, "yyyy-mm-dd") & "#"
End If
For Each varItm In Me.lbxMulti.ItemsSelected
strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
Next varItm
If strIn <> "" Then
' Remove initial comma
strIn = Mid(strIn, 2)
strWhere = strWhere & " AND [SomeField] In (" & strWhere & ")"
End If
If strWhere <> "" Then
' Remove initial " AND "
strWhere = Mid(strWhere, 6)
End If
DoCmd.OpenReport ReportName:="rptMyReport", View:=acViewPreview, WhereCondition:=strWhere
Exit Sub
ErrHandler:
If Err = 2501 Then
' Report cancelled - ignore
Else
MsgBox Err.Description, vbExclamation
End If
End Sub
If SomeField is a text field instead of a number field, change the line
strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
to
strIn = strIn & "," & Chr(34) & Me.lbxMulti.ItemData(varItm) & Chr(34)
Regards, Hans Vogelaar (http://www.eileenslounge.com) -
To get first date and end date after entering any month and year
Hi,
I need to to get first date and end date of a month and year in yyyyMMdd format. I am reading month and year from a properties file. But I don't know how to get the first date and End date in given format. The properties file gives me just text. But I don't know how to get the date format using this. I need this urgently. Can anyone help me to get code for this?
I am reading the fields as,
Properties props = new Properties();
props.load(new FileInputStream("AnyMonthVolume.properties"));
String date_month = props.getProperty("date_month");
String date_year = props.getProperty("date_year");
Thanks.I know this has been posted a while ago but incase someone looking for it, here is the code to get the end of current month date.
Calendar cal = Calendar.getInstance();
cal.setTime(new java.util.Date());
cal.set(Calendar.DATE, 1); //set the date to start of month
cal.add(Calendar.MONTH,1);
cal.add(Calendar.DATE,-1);
System.out.println(cal.getTime());
Maybe you are looking for
-
Black Screen with cursor. Java Desktop System.
Hello everyone. I've installed Solaris 10 05/08 x86 32bit in VMWare Workstation 6.5. After I logged in in the system (Java Desktop System, Release 3), I've got only a black screen with cursor, nothing more. X server: Xsun server configuration: Video
-
Can I dual boot with MAC OS/X and Windows
What is the best way to configure a dual boot on my MAC Bookpro laptop? Also, can I dual boot Windows 8 and MAC OS?
-
I am trying transfer a VHS tape onto a DVD. I have a clip from my WinXP PVR in MPEG-2 format that I am able to open with Quicktime (after buying the separate codec grrr) but it will not import into iMovie. iMovie briefly flashes the "Importing" scree
-
Is my headphone jack broken?
I was just listening to music when I dropped my iphone 4s on to my floor. (It has an otterbox on it). After I picked it up, nothing would play through the headphones. I tried rebooting it, cleaning the headphone jack and I'm going to try to restore i
-
Podcasts not showing up from search
Hi, I logged in today on iTunes and noticed that our podcasts are no longer showing up on iTunes Store. I tried doing a search on 'fowler' and 'fowlerinc' and couldn't find anything. I checked the XML file and didn't find any errors, so I was wonderi