Code Project

Link Unit

Friday, October 30, 2009

How to find the current value of a sequence number

This seems to be a simple question , and the following error will appear if we try currval on a sequence.

Select s.currval from dual

ORA-08002: sequence S.CURRVAL is not yet defined in this session

CURRVAL doesn't represent anything global about the sequence number generator. It only represents the value returned to your session (the database session processing the current statements) the last time you called NEXTVAL for that sequence

Solutions :
#1 before using CURRVAL you should call NEXTVAL .
#2 You can get the current value of the Sequence by querying DBA_SEQUENCES , which is Last_number.

An attempt was made to load a program with an incorrect format (Exception from HRESULT:0X800700008)

This problem is for sure of 64bit machine.

If an add-on is set to run on a 64 bit environment ensure it is compiled with a 32 bit operating system. The reason is the current SAPbobsCOM.dll can not run with 64 bit compiled add-ons.

You must compile your add-on and your installation program at 32 bit. You must force it because SAPBouiCom e SAPBobsCom are 32 bit component. A 64-bit program cannot call a 32-bit component.

Solution:When you create your application and when you are creating through your B1 installer. Go to the project properties-->select compile option and in that Advanced compile option-->change your target CPU to x86..rebuild your project again and create your refresh ard using these settings...

After doing above steps we faced following Error: "wrong digital signture for addon instller" Solution:The problem may be that rebuilding add-on project then generate ARD, while the old add-on executable is included in your add-on installer.
You should make sure it is the same executable of your add-on when generate the ARD and Installation. And you're recommended to do this with B1DE, it helps you to generate ARD and Installation once.
Actually, In ARD file it has unique digital signature for the add-on executable. The mismatch of the executable of add-on in ARD and Installer will lead to wrong digital signature error. Reason for Wrong digital signature:
1.You build the add-on project, then add-on executable is generated. e.g. MyAddOn.exe
2.You use this executable in the add-on installer (what ever InstallShield or other)
3.You rebuild the add-on project, then actually it is a different executable generated. Even its name is still MyAddOn.exe
4.You generate ARD on the basis of the second one. Then you will get the Wrong Digital Signature. Again, you should make sure it is the same executable file of your add-on that is used in ARD generation and included in your install shield. Meaning you shouldn't rebuild the add-on project when generate ARD or Installation, make sure ARD and Installer are referring to the same "version" of add-on executable

Every time you create an installer, you should create a new .ard file. This file contains an digital signature of your installer executable, and one digital signature of the main executable of your Add-on. (with digital signature SB1 means some kind of hash/checksum of the file)The notice you've get is because you don't have the correct signature in your .ard file for the Add-on executable. If you are creating it manually, select the correct Add-on Exe Full Path in the Add-On Registration Data Generator.
I hope this will help...as it solved my problem