GetParameter()==NULL and memory
Hi everybody !
I'm creating a web site where users will be able to plot data from a database.
So, I've an HTML code which call a PHP one which himself get data from database and create an JAVA applet on the following model :
echo "<APPLET\n";
echo "<PARAM NAME=\"valeur\" VALUE=\"".$string."\">\n";
echo "</APPLET>\n";where $string is like "time1%data1@time2%data2@...."
Then I get this string value in the JAVA applet with :
String[] res = getParameter("valeur").split("@");But for too huge data size the getParameter return a NULL value as PHP hadn't create the associated param value.
Does someone have an idea to explain such behaviour ?
Thanks !
nodules wrote:
..in that case I'll have to execute the query in the applet, and so, on the client side which is not really safe, isn't it ?In my suggestion I think the answer is 'yes'.
.. Since I'll have to export password, etc on the client side ...Which is why ejp (who knows far more about remote access to DBs) added..
..or have it perform an HTTP request of its own ..Which I think means to have the applet connect to (for example) a servlet that does the query. The servlet would not expose the password or location of the database, and might do other checks (like that the user is actually allowed to delete every record). ;)
Similar Messages
-
Stringtokenizer, swing and memory
i lately found that the stringtokenizer eats up lots of memory, i tried to set vars to null and called sys gc quite often but they didnt seem to be of much help.
ok, here is what i was doing: i read in a quite a big txt file, about 400k lines, and then parsed each line using stringtokenizer, everything happened in while loops, lots of objects but all small ones. i had to xmx lots of memories to it in order to run it. and it became much worse when i put it into multi threaded swing app. if you are a swing expert, or stringtokenizer expert, please shed some light.Dang it! Sun zapped a bunch of posts!
Anyway, here again is a sample pgm posted earlier (which got zapped) showing some of the benefits of the finally block, for which the idiot daFei could not come up with an intelligent answer to refute it (he STILL has a beef with the finally block, claiming it is only "syntactic sugar", and still moronically implies that all methods must handle all exceptions, which is absurd in that no exceptions could ever be THROWN then!)
import java.io.File;
import java.io.IOException;
class SillyQuestionException extends Exception {
public SillyQuestionException() {
super("That's a silly question. Of course!");
class Guru {
* Responds to a question/statement. A temporary file is created
* during execution, and deleted upon return (unless daFei dorks
* with the implementation!)
* @param request the question/statement for Guru to respond to
* @return the Guru's response
* @throws SillyQuestionException if the Guru determines you're
* asking a silly question,
* to which the answer should be obviously YES
public static String respond(String request)
throws SillyQuestionException {
File f = new File("daFei.is.an.idiot");
try {
System.out.println(" Guru is thinking...");
f.createNewFile();
// let's just assume we needed to write stuff to this file in
// order to process the request...
// now the actual end of processing
if ("is daFei an idiot".equals(request))
throw new SillyQuestionException();
catch (IOException e) {
System.out.println("Error occurred creating/writing to " +
"temp file, but graceful recovery is possible");
e.printStackTrace();
return "I'll have to get back to you on that one. " +
"Ask me again later.";
finally {
// this is NECESSARY to GUARANTEE deletion of the temp file,
// otherwise this statement would have to be duplicated at all
// possible return points.
System.out.println(" Guru has processed your request...");
if (f != null)
f.delete();
System.out.println(" will this get printed EVERY time? " +
"NO IT WILL NOT!");
return "daFei has fish turds in his brain";
public class Demo {
public static void main(String[] args) {
String[] questions = {
"what statement best describes daFei",
"what kind of turds does daFei have in his brain",
"is daFei an idiot",
"won't get to this question"
try {
for (int i = 0; i < questions.length; ++i) {
System.out.println("Question: " + questions);
System.out.println("Response: " + Guru.respond(questions[i]));
catch (SillyQuestionException e) {
System.out.println("I have finally asked the Guru a silly " +
"question, and will stop now");
System.out.println("Here's what Guru had to say to the last " +
"question: " + e); -
Mds process shoots up CPU and Memory
I upgraded to OS X Mavericks about a month ago and ever since, have had to disable Spotlight due to shooting CPU and Memory. The only way to get my Mac to a usable state is to add Macintosh HD to Spotlight privacy list to prevent indexing. The moment I do that, CPU and Memory get to normal.
Here is what Memory/CPU looks when I am doing nothing on my Mac and all apps are closed:
mds
1.76 GB
6
195
349
root
100.2
42.25
0 bytes
0 bytes
0
0
No
No
0 bytes
0 bytes
0 bytes
64 bit
No
Yes
0 bytes
0 bytes
0 bytes
kernel_task
598.3 MB
93
0
0
root
1.7
17.61
0 bytes
0 bytes
0
0
No
No
0 bytes
0 bytes
0 bytes
64 bit
No
No
0 bytes
0 bytes
0 bytes
com.apple.IconServicesAgent
116.1 MB
2
65
214
RockingVegan
0.0
0.80
0 bytes
0 bytes
0
0
No
No
0 bytes
0 bytes
0 bytes
64 bit
Yes
Yes
0 bytes
0 bytes
0 bytes
Finder
85.5 MB
6
296
165
RockingVegan
0.0
5.99
0 bytes
0 bytes
0
0
No
No
0 bytes
0 bytes
0 bytes
64 bit
Yes
No
0 bytes
0 bytes
0 bytes
WindowServer
57.0 MB
5
297
112
_windowserver
0.7
9.27
0 bytes
0 bytes
0
0
No
No
0 bytes
0 bytes
0 bytes
64 bit
No
No
0 bytes
0 bytes
0 bytes
CVMCompiler
48.3 MB
2
38
233
RockingVegan
0.0
5.06
0 bytes
0 bytes
0
0
No
No
0 bytes
0 bytes
0 bytes
64 bit
No
Yes
0 bytes
0 bytes
0 bytes
mds_stores
34.9 MB
3
60
248
root
0.0
7.16
0 bytes
0 bytes
0
0
No
No
0 bytes
0 bytes
0 bytes
64 bit
No
Yes
0 bytes
0 bytes
0 bytes
mdworker
32.9 MB
4
62
351
RockingVegan
0.0
3.81
0 bytes
0 bytes
0
0
No
No
0 bytes
0 bytes
0 bytes
64 bit
Yes
Yes
0 bytes
0 bytes
0 bytes
mdworker
31.6 MB
4
62
354
RockingVegan
0.0
3.66
0 bytes
0 bytes
0
0
No
No
0 bytes
0 bytes
0 bytes
64 bit
Yes
Yes
0 bytes
0 bytes
0 bytes
mdworker
31.4 MB
4
62
352
RockingVegan
0.0
3.68
0 bytes
0 bytes
0
0
No
No
0 bytes
0 bytes
0 bytes
64 bit
Yes
Yes
0 bytes
0 bytes
0 bytes
mdworker
31.3 MB
4
62
353
RockingVegan
0.0
3.67
0 bytes
0 bytes
0
0
No
No
0 bytes
0 bytes
0 bytes
64 bit
Yes
Yes
0 bytes
0 bytes
0 bytes
mds
100.1
1:07.13
8
1
349
root
2.31 GB
190
0 bytes
0 bytes
0
0
No
No
0 bytes
0 bytes
0 bytes
64 bit
No
Yes
0 bytes
0 bytes
0 bytes
Here is what EtreCheck shows: I cleaned up a bunch of stuff based on other such discussions. I see a bunch of User Launch Agents - I deleted these from /Library/User Agents - and rebooted, but these don't seem t go away from the list.
Hardware Information:
MacBook Pro (15-inch, Late 2011)
MacBook Pro - model: MacBookPro8,2
1 2.4 GHz Intel Core i7 CPU: 4 cores
8 GB RAM
Video Information:
Intel HD Graphics 3000 - VRAM: 512 MB
AMD Radeon HD 6770M - VRAM: 1024 MB
Audio Plug-ins:
BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
AirPlay: Version: 1.9 - SDK 10.9
AppleAVBAudio: Version: 2.0.0 - SDK 10.9
iSightAudio: Version: 7.7.3 - SDK 10.9
System Software:
OS X 10.9.1 (13B42) - Uptime: 0 days 0:5:9
Disk Information:
Hitachi HTS727575A9E362 disk0 : (750.16 GB)
EFI (disk0s1) <not mounted>: 209.7 MB
Macintosh HD (disk0s2) /: 749.3 GB (414.88 GB free)
Recovery HD (disk0s3) <not mounted>: 650 MB
MATSHITADVD-R UJ-8A8
USB Information:
Apple Inc. BRCM2070 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Inc. FaceTime HD Camera (Built-in)
Apple Computer, Inc. IR Receiver
FireWire Information:
Thunderbolt Information:
Apple Inc. thunderbolt_bus
Kernel Extensions:
Problem System Launch Daemons:
Problem System Launch Agents:
Launch Daemons:
Launch Agents:
User Launch Agents:
[failed] com.apple.CSConfigDotMacCert-[redacted]@me.com-SharedServices.Agent.plist
[loaded] com.macpaw.CleanMyMac.trashSizeWatcher.plist
[failed] com.spotify.webhelper.plist
[failed] com.UninstallerTool.plist
[failed] com.VolumeWatcherTool.plist
User Login Items:
None
3rd Party Preference Panes:
Citrix online plug-in
Flash Player
Java
MusicManager
Internet Plug-ins::
Flash Player: Version: 11.9.900.170 - SDK 10.6
AdobePDFViewer: Version: 10.1.2
eMusicRemote: Version: (null)
googletalkbrowserplugin: Version: 4.9.1.16010
SpeedDownload Browser Plugin: Version: 2.1.2
iPhotoPhotocast: Version: 7.0
AmazonMP3DownloaderPlugin1017265: Version: AmazonMP3DownloaderPlugin 1.0.17
RealPlayer Plugin: Version: Unknown
Veoh Plugin: Version: 3.0
DirectorShockwave: Version: 12.0.7r148 - SDK 10.6
QuickTime Plugin: Version: 7.7.3
PDF Browser Plugin: Version: 2.4.2 - SDK 10.6
FlashPlayer-10.6: Version: 11.9.900.170 - SDK 10.6
CitrixICAClientPlugIn: Version: 11.1.0
AmazonMP3DownloaderPlugin: Version: AmazonMP3DownloaderPlugin 1.0.17
npgtpo3dautoplugin: Version: 0.1.44.29 - SDK 10.5
DivXBrowserPlugin: Version: 2.2
eMusic: Version: Unknown
Silverlight: Version: 5.1.20913.0 - SDK 10.6
Default Browser: Version: 537 - SDK 10.9
Flip4Mac WMV Plugin: Version: 2.4.4.2
o1dbrowserplugin: Version: 4.9.1.16010
SharePointBrowserPlugin: Version: 14.3.9 - SDK 10.6
JavaAppletPlugin: Version: Java 7 Update 45
User Internet Plug-ins::
Move-Media-Player: Version: npmnqmp 071706000001
iGetterBundle: Version: 2.8.5
OctoshapeWeb: Version: 1.0
Bad Fonts:
None
Old applications:
Keynote: Version: 5.3 - SDK 10.5
/Applications/iWork '09/Keynote.app
Microsoft Alerts Daemon: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Office/Microsoft Alerts Daemon.app
Microsoft Chart Converter: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Office/Microsoft Chart Converter.app
Microsoft Clip Gallery: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Office/Microsoft Clip Gallery.app
Microsoft Communicator: Version: 13.1.3 - SDK 10.5
/Applications/Microsoft Communicator.app
Microsoft Database Daemon: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Office/Microsoft Database Daemon.app
Microsoft Database Utility: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Office/Microsoft Database Utility.app
Microsoft Document Connection: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Microsoft Document Connection.app
Microsoft Excel: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Microsoft Excel.app
Microsoft Graph: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Office/Microsoft Graph.app
Microsoft Language Register: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Additional Tools/Microsoft Language Register/Microsoft Language Register.app
Microsoft Office Reminders: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Office/Microsoft Office Reminders.app
Microsoft Office Setup Assistant: Version: 14.2.0 - SDK 10.5
/Applications/Microsoft Office 2011/Office/Microsoft Office Setup Assistant.app
Microsoft Outlook: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Microsoft Outlook.app
Microsoft PowerPoint: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Microsoft PowerPoint.app
Microsoft Upload Center: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Office/Microsoft Upload Center.app
Microsoft Word: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Microsoft Word.app
Music Manager: Version: 1.0 - SDK 10.5
/Applications/MusicManager.app
My Day: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Office/My Day.app
Numbers: Version: 2.3 - SDK 10.5
/Applications/iWork '09/Numbers.app
Open XML for Excel: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Office/Open XML for Excel.app
Pages: Version: 4.3 - SDK 10.5
/Applications/iWork '09/Pages.app
Solver: Version: 1.0 - SDK 10.5
/Applications/Microsoft Office 2011/Office/Add-Ins/Solver.app
SyncServicesAgent: Version: 14.3.9 - SDK 10.5
/Applications/Microsoft Office 2011/Office/SyncServicesAgent.app
Time Machine:
Mobile backups: OFF
Auto backup: YES
Volumes being backed up:
Macintosh HD: Disk size: 697.84 GB Disk used: 311.45 GB
Destinations:
Time Machine Backups [Local] (Last used)
Total size: 931.19 GB
Total number of backups: 14
Oldest backup: 2012-06-30 03:15:51 +0000
Last backup: 2013-12-18 22:18:59 +0000
Size of backup disk: Too small
Backup size 931.19 GB < (Disk used 311.45 GB X 3)
Time Machine details may not be accurate.
All volumes being backed up may not be listed.
Top Processes by CPU:
100% mds
4% WindowServer
2% Activity Monitor
1% EtreCheck
0% sysmond
Top Processes by Memory:
4.40 GB mds
115 MB Finder
115 MB com.apple.IconServicesAgent
66 MB mds_stores
57 MB WindowServer
Virtual Memory Statistics:
14 MB Free RAM
2.79 GB Active RAM
2.78 GB Inactive RAM
1.18 GB Wired RAM
274 MB Page-ins
104 KB Page-outsStep 1:
Loaded extrinsic user agents:
com.growl.GrowlLauncher
com.stellar.VolumeWatcher
com.stellar.UninstallerTool
com.spotify.webhelper
com.macpaw.CleanMyMac.trashSizeWatcher
Safari extensions:
DivXHTML5
Searchme
Restricted user files: 53
Extrinsic loadable bundles:
/System/Library/Extensions/2.2.0/Belcarra.USBLAN_netpart.kext (com.Belcarra.iokit.USBLAN_netpart)
/System/Library/Extensions/2.2.0/Belcarra.USBLAN_usbpart.kext (com.Belcarra.iokit.USBLAN_usbpart)
/System/Library/Extensions/2.2.0/RemoteControl.USBLAN_usbpart.kext (com.RemoteControl.USBLAN.usbpart)
/System/Library/Extensions/3.1.1/Belcarra.USBLAN_netpart.kext (com.Belcarra.iokit.USBLAN_netpart)
/System/Library/Extensions/3.1.1/Belcarra.USBLAN_usbpart.kext (com.Belcarra.iokit.USBLAN_usbpart)
/System/Library/Extensions/3.1.1/RemoteControl.USBLAN_usbpart.kext (com.RemoteControl.USBLAN.usbpart)
/System/Library/Extensions/Belcarra.USBLAN_netpart.kext (com.Belcarra.iokit.USBLAN_netpart)
/System/Library/Extensions/Belcarra.USBLAN_usbpart.kext (com.Belcarra.iokit.USBLAN_usbpart)
/System/Library/Extensions/daspi.kext (com.makemkv.kext.daspi)
/System/Library/Extensions/iavkfs.kext (com.pctools.iantivirus.kfs)
/System/Library/Extensions/RemoteControl.USBLAN_usbpart.kext (com.RemoteControl.USBLAN.usbpart)
Library/Address Book Plug-Ins/SkypeABDialer.bundle (com.skype.skypeabdialer)
Library/Address Book Plug-Ins/SkypeABSMS.bundle (com.skype.skypeabsms)
Library/Address Book Plug-Ins/YMsgrCallABPlugin.bundle (com.yahoo.YMsgrCallABPlugin)
Library/Address Book Plug-Ins/YMsgrMsnABPlugin.bundle (com.yahoo.YMsgrMsnABPlugin)
Library/Address Book Plug-Ins/YMsgrSmsABPlugin.bundle (com.yahoo.YMsgrSmsABPlugin)
Library/Address Book Plug-Ins/YMsgrYimABPlugin.bundle (com.yahoo.YMsgrYimABPlugin)
Library/Internet Plug-Ins/iGetterBundle.plugin (com.presenta.iGetterBundle)
Library/Internet Plug-Ins/Move-Media-Player.plugin (com.movenetworks.movemediaplayer.plugin)
Library/Internet Plug-Ins/OctoshapeWeb.plugin (com.octoshape.browserplugin)
Library/PreferencePanes/MusicManager.prefPane (com.google.musicmanager.pref)
Library/Services/ToastIt.service (com.roxio.ToastItService)
/Library/Audio/MIDI Drivers/EmagicUSBMIDIDriver.plugin (info.emagic.driver.unitor)
/Library/Internet Plug-Ins/Accel ViewTIFF.bundle (com.acordex.AccelViewTIFF)
/Library/Internet Plug-Ins/AdobePDFViewer.plugin (com.adobe.acrobat.pdfviewer)
/Library/Internet Plug-Ins/AmazonMP3DownloaderPlugin.plugin (com.AmazonMP3DownloaderPluginLib.Amazon MP3 Downloader Plugin)
/Library/Internet Plug-Ins/AmazonMP3DownloaderPlugin1017265.plugin (com.AmazonMP3DownloaderPluginLib.Amazon MP3 Downloader Plugin)
/Library/Internet Plug-Ins/CitrixICAClientPlugIn.plugin (com.citrix.citrixicaclientplugIn)
/Library/Internet Plug-Ins/DirectorShockwave.plugin (com.adobe.director_12_0.shockwave.pluginshim)
/Library/Internet Plug-Ins/DivXBrowserPlugin.plugin (com.divx.DivXBrowserPlugin)
/Library/Internet Plug-Ins/eMusicRemote.plugin (com.emusic.plugins.emp.mac)
/Library/Internet Plug-Ins/Flash Player.plugin (com.macromedia.Flash Player.plugin)
/Library/Internet Plug-Ins/Flip4Mac WMV Plugin.plugin (net.telestream.wmv.plugin)
/Library/Internet Plug-Ins/googletalkbrowserplugin.plugin (com.google.googletalkbrowserplugin)
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin (com.oracle.java.JavaAppletPlugin)
/Library/Internet Plug-Ins/npContributeMac.bundle (com.adobe.npContributeMacBundle)
/Library/Internet Plug-Ins/npgtpo3dautoplugin.plugin (com.google.o3d)
/Library/Internet Plug-Ins/o1dbrowserplugin.plugin (com.google.o1dbrowserplugin)
/Library/Internet Plug-Ins/PDF Browser Plugin.plugin (com.schubert-it.internet-plugin.pdf)
/Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin (com.microsoft.sharepoint.browserplugin)
/Library/Internet Plug-Ins/SharePointWebKitPlugin.webplugin (com.microsoft.sharepoint.webkitplugin)
/Library/Internet Plug-Ins/Silverlight.plugin (com.microsoft.SilverlightPlugin)
/Library/Internet Plug-Ins/SpeedDownload Browser Plugin.plugin (com.yazsoft.browserplugin)
/Library/Internet Plug-Ins/Veoh Plugin.plugin (com.veoh.plugin)
/Library/Internet Plug-Ins/Veoh Plugin.webplugin (com.veoh.webplugin)
/Library/PreferencePanes/Citrix online plug-in.prefPane (com.citrix.StandAlone)
/Library/PreferencePanes/Flash Player.prefPane (com.adobe.flashplayerpreferences)
/Library/PreferencePanes/JavaControlPanel.prefPane (com.oracle.java.JavaControlPanel)
/Library/QuickTime/SoundboothScoreCodec.component (com.adobe.SoundboothScoreAudioCodec)
/Library/ScriptingAdditions/Adobe Unit Types.osax (No bundle ID)
/Library/ScriptingAdditions/TotalFinder.osax (com.binaryage.totalfinder.injector)
Unsigned shared libraries:
/usr/lib/libesets.4.dylib
/usr/lib/libesets_as.4.dylib
/usr/lib/libsup.dylib
/usr/local/lib/libavcodec.52.108.0.dylib
/usr/local/lib/libavcore.0.16.1.dylib
/usr/local/lib/libavdevice.52.2.3.dylib
/usr/local/lib/libavfilter.1.74.0.dylib
/usr/local/lib/libavformat.52.93.0.dylib
/usr/local/lib/libavutil.50.36.0.dylib
/usr/local/lib/libfuse_ino64.2.dylib
/usr/local/lib/libmp3lame.0.dylib
/usr/local/lib/libntfs-3g.80.dylib
/usr/local/lib/libntfs.9.0.0.dylib
/usr/local/lib/libswscale.0.12.0.dylib
/usr/local/lib/libublio.1.dylib
Library/LaunchAgents:
com.UninstallerTool.plist
com.VolumeWatcherTool.plist
[email protected]t
com.macpaw.CleanMyMac.trashSizeWatcher.plist
com.spotify.webhelper.plist
/Library/PrivilegedHelperTools:
com.microsoft.office.licensing.helper
net.sourceforge.MonolingualHelper
Library/Fonts:
Gentium
GentiumAlt
TLWHM0NT.TTF
encodings.dir
fonts.dir
fonts.list
fonts.scale -
see these code:
RECT b={test.rcPaint.left+2, test.rcPaint.top, test.rcPaint.right-2, test.rcPaint.bottom};
imglabel.DrawText(inst->strCaption, b);
//DrawText() from my image class:
void DrawText(string strText,RECT HDCrect)
char *text=(char*)strText.c_str();
DrawTextEx(HBitmap,text,-1,&HDCrect,DT_LEFT,NULL);
what is the deference, speaking on RECT, between PAINTSTRUCT hdc and memory HDC?
if i do top=1 or left=1, the Region reault is changed too :(i was getting problems between the image size and bottom\right, with Regions.
see these function on my image class:
void DrawText(string strText,int PosX=0, int PosY=0)
// geting the text rectangle
RECT r = { 0, 0, 0, 0 };
char *text=(char*)strText.c_str();
::DrawText(HBitmap, text, -1, &r, DT_CALCRECT);
//change the position of the text
r.left=PosX;
r.top=PosY;
r.bottom=r.bottom+PosY;
r.right=r.right+PosX;
//draw the text
::DrawText(HBitmap, text, -1,&r,DT_LEFT);
and see how i use it:
imglabel.DrawText(inst->strCaption);//inst my label object pointer
//imglabel is my image object
if(inst->blnTransparent==true)
//draw the image
TransparentBlt(test.hdc,0,0,imglabel.width(),imglabel.height(),imglabel,0,0, imglabel.width(),imglabel.height(), inst->clrBackColor);
//destroy the region
SetWindowRgn(inst->hwnd,NULL,TRUE);
//Create and set them region
inst->LabelRegion=RegionbyBitmap(imglabel, inst->clrBackColor);
SetWindowRgn(inst->hwnd,inst->LabelRegion,TRUE);
if i don't destroy the Region, before use the new Region, i get a size problem(less pixels).
by some reason the text RECT can affect the Region size :( -
Using NULL and NOT NULL in prompted filters
Dear all,
While trying to grap the concept of prompted filters in sap bo web intelligence, I had a question whether why we cannot use NULL and NOT NULL while creating a prompted filters in our report.HI,
'Is Null' and 'Not Null' are the predefined functions in webi which only eliminate the null values or considering only null values.
'Is Null' and 'Not Null' are itself predefined functions that why you are not getting prompts.
Null values are standard across the databases so this is defined as a function in webi to specific eliminate the null values.
If something is not standard then there is option in the webi to use different operator with static values or with prompts.
More more information on Null see the Null wiki page.
Null (SQL) - Wikipedia, the free encyclopedia
Amit -
Not null and enable or disable column in tabular form
Hi,
Using apex version 4.1 and working on tabular form.
ACT_COA_SEGMENT_MAS is Master table
and
ACT_SEGMENT_VALUES_MAS is detail table
I have entered 8 rows in master table and PARENT_SEGMENT_ID is column in master table which is null able. If i specified PARENT_SEGMENT_ID with value in master table then in detail table there is column PARENT_ID that should not be null and enable.
How i can enable or disable column when in master table PARENT_SEGMENT_ID column is null then in detail table PARENT_ID column should disable and vice versa.
I have created tabular form on Detail table. before insert into the tabular form Check in master table in first entry if PARENT_SEGMENT_ID is not null in first row of master table then in tabular form PARENT_ID should enable and not null able in corresponding to this first row id's lines in tabular form.
Same should check for second row in master table if PARENT_SEGMENT_ID is not null then entered rows with PARENT_ID into tabular form corresponding to 2nd id in master table should not nullable and column should enable in tabular form.
Thanks & Regards
Vedant
Edited by: Vedant on Jan 9, 2013 9:12 PMVedant,
You need to create you own manual tabular form and not use the wizard.
Using APEX_ITEM api you should be build you own form and you will be able to control how you wan to display the rows. (See Link [Apex Item Help|http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#CACEEEJE] )
select case when PRIMARY_TABLE_COLUMN is null then APEX_ITEM.DISPLAY_AND_SAVE(3 , DETAIL_COLUMN ) else APEX_ITEM.TEXT(2,detail_column) end "ALIAS" from detail table
Hope that help.
Vivek -
Connection ==null and Connection is closed, difference
Hi experts,
I wonder what are the differences between "Connection==null" and "Connection is closed"?
I closed a connection on one JSP page after a bean has retrieved data. Then, on the same page I call another bean to connect to the database. Because the Connection object has been created earlier, therefore Connection is not NULL, but it is closed. So, the second bean has to initiate another connection(if I knew how to test the "closed" status)
Is it true that if the Connection is closed, then it should become null?
I think I must have make quite a few mistakes in above statement:). Please help. Thanks a lot.connection.isClosed() will tell you if the connection object is closed or not. If it is closed, then the connection object can be dropped because you will not be able to create any new statements from that connection object. Just recreate another connection to use when this occurs.
-
Is null and regular value in where ($variable)
is there any polibility to create select depend on value in where ?
select count(x) where y = $variablebut if variable is NULLit doesn't work cause must be IS NULL or IS NOT
select count(x) where y is $variableIs there any posibility to make it working with null and regular variable?try:
select count(x) from <yourtable> where nvl(y,<not_possible_value>) = nvl($variable,<not_possible_value>);where <not_possible_value> is a value that is not possible for column y.
E.g. if y always is a positive number you could use the value -1. -
Avoiding null and duplicate values using model clause
Hi,
I am trying to use model clause to get comma seperated list of data : following is the scenario:
testuser>select * from test1;
ID VALUE
1 Value1
2 Value2
3 Value3
4 Value4
5 Value4
6
7 value5
8
8 rows selected.
the query I have is:
testuser>with src as (
2 select distinct id,value
3 from test1
4 ),
5 t as (
6 select distinct substr(value,2) value
7 from src
8 model
9 ignore nav
10 dimension by (id)
11 measures (cast(value as varchar2(100)) value)
12 rules
13 (
14 value[any] order by id =
15 value[cv()-1] || ',' || value[cv()]
16 )
17 )
18 select max(value) oneline
19 from t;
ONELINE
Value1,Value2,Value3,Value4,Value4,,value5,
what I find is that this query has duplicate value and null (',,') coming in as data has null and duplicate value. Is there a way i can avoid the null and the duplicate values in the query output?
thanks,
Edited by: orausern on Feb 19, 2010 5:05 AMHi,
Try this code.
with
t as ( select substr(value,2)value,ind
from test1
model
ignore nav
dimension by (id)
measures (cast(value as varchar2(100)) value, 0 ind)
rules
( ind[any]= instr(value[cv()-1],value[cv()]),
value[any] order by id = value[cv()-1] || CASE WHEN value[cv()] IS NOT NULL
and ind[cv()]=0 THEN ',' || value[cv()] END
select max(value) oneline
from t;
SQL> select * from test1;
ID VALUE
1 Value1
2 Value2
3 Value3
4 Value4
5 Value4
6
7 value5
8
8 ligne(s) sélectionnée(s).
SQL> with
2 t as ( select substr(value,2)value,ind
3 from test1
4 model
5 ignore nav
6 dimension by (id)
7 measures (cast(value as varchar2(100)) value, 0 ind)
8 rules
9 ( ind[any]= instr(value[cv()-1],value[cv()]),
10 value[any] order by id = value[cv()-1] || CASE WHEN value[cv()] IS NOT NULL
11 and ind[cv()]=0 THEN ',' || value[cv()] END
12 )
13 )
14 select max(value) oneline
15 from t;
ONELINE
Value1,Value2,Value3,Value4,value5
SQL> -
Replacing NULL and EmptyString('') with "Unknown" in SSRS parameter dropdown
All,
What I want to do is, in the SSRS parameter drop down, instead of showing NULL and Blank values(), i want to categorize them as "Unknown", so, if the user selects "Unknown" from the SSRS drop down parameter, he should be able to see all
the records that have NULL values or empty strings in that particular column in the result set.
Can you tell me, how should I handle it in my main stored proc as well as in the dataset?
Right now, i have something like this:
Where
(t1.name in (select value from dbo.Split(@TName,',')) OR @TName IN ('All'))
-- Where t1.Name has empty strings and NULL values. Both of these values should be categorized under "Unknown"
-- How would the dataset query look like? Right now I have this query for populating the drop down for that parameter:
Select All
UNION
Select Distinct Name
Order BY 1Hello,
Please refer to the following stored procedure:
SELECT
CASE WHEN TName IS NULL OR TName = ''
THEN 'Unknown' ELSE TName END AS TName
From DemoTable
Then, use following query code to get the parameter values:
SELECT Distinct
CASE WHEN TName IS NULL OR TName = '' THEN 'Unknown'
ELSE TName END AS TName
FROM DemoTable
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
Hi All,
I like to know, is it NULL and Space value is same in ABAP, if it is not how to check null value.
Thank you.
Senthileverything is correct though some answers are not correct.
A Database NULL value represents a field that has never been stored to database - this saving space, potentially.
Usually all SAP tables are stored with all fields, empty fields are stored with their initial value.
But: If a new table append is created and the newly-added fields do not have the 'initial value' marked in table definition, Oracle will just set NULL values for them.
as mentioned: There is no NULL value to be stored in an ABAP field. The IS NULL comparison is valid only for WHERE clause in SELECT statement. WHERE field = space is different from WHERE field IS NULL. That's why you should check for both specially for appended table fields.
If a record is selected (fulfilling another WHERE condition) into an internal table or work area, NULL values are convertted to their initial values anyway.
Hope that sheds some light on the subject!
regards,
Clemens -
Hello Gurus:
I have had to use BOTH 'null' and 'space' (ofcourse I tried 'initial' too...) when selecting data from PRPS table, otherwise all the required records were not fetched. I had to do this on two different occassions. The first is a SAP provided field and the other is customer's enhancement. I have cut-paste the two code blocks. Any ideas why?
Thanks in advance,
Sard.
***********(1)**************
select posid objnr func_area zzfunct from prps into
corresponding fields of table it_wbs
where func_area is null or
func_area eq space.
************(2)**************
select prps-pspnr prps-posid prps-post1
into (wa_test1-pspnr, wa_test1-posid, wa_test1-post1,
from prps
where prps-posid in s_wbs and
... and
( prps-zzmlind is null or prps-zzmlind eq space ).
append wa_test1 to it_test1.
clear wa_test1.
endselect.Hello Richard,
the Requirement to check for NULL corresponds to the definition of the database (field) within the DDIC. Check the flag initialize (it has also some documentation).
This flag is intended to be used if the definition of the db table is changed at SAP while the table already is used at customer side.
After deploying the corresponding patch or upgrade such a changed definition may result into the need to convert all entries. For tables with many entries this would result into inacceptable downtime. So such changes are done without the initialiazation/conversion of existing entries.
The tradeoff is the syntax you noticed.
Kind regards
Klaus -
If table testrh2 has the following columns and data
col1 --> NULL
col2 --> 2
and table testrh has the following columsn and data
col1 --> NULL
How could I write a dynamic SQL statement to join on the nulls? I've written the following block as a starting point.
declare
cursor c1 is select col1 from isis.testrh;
lval varchar2(1000);
lval2 varchar2(1000);
begin
for r1 in c1 loop
lval := 'select col2 from isis.testrh2 where col1 = '||r1.col1;
execute immediate lval into lval2;
dbms_output.put_line(lval2);
end loop;
end;You can't compare null values with '=' in Oracle SQL.
Null can only be compared with <column> is null .
You can see it when you try these two queries:
select * from dual where null is null; -- you will see one row
select * from dual where null=null; -- you will see no rowsThat's why you have to write something like
(<column1>=<column1> or (<column1> is null and <column2> is null))This should also work with null:
decode(<column1>,<column2>,1,0)=1By the way, why do you use dynamic sql?
lval := 'select col2 from isis.testrh2 where col1 = '||r1.col1;
I think you could replace your two lines ( lval:= ... AND execute immediate) by this:
begin
select col2
into lval
from isis.testrh2
where decode(col1,r1.col1,1,0)=1;
dbms_output.put_line('lval='||lval);
exception
when no_data_found then
dbms_output.put_line('no data found'); -- or whatever you want
end;Edited by: hartmutm on 02.10.2010 23:54 -
Null and empty string not being the same in object?
Hello,
I know that null and empty string are interpreted the same in oracle.
However I discovered the strange behaviour concerning user defined objects:
create or replace
TYPE object AS OBJECT (
value VARCHAR2(2000)
declare
xml xmltype;
obj object;
begin
obj := object('abcd');
xml := xmltype(obj);
dbms_output.put_line(xml.getStringVal());
obj.value := '';
xml := xmltype(obj);
dbms_output.put_line(xml.getStringVal());
obj.value := null;
xml := xmltype(obj);
dbms_output.put_line(xml.getStringVal());
end;
When creating xml from object, all not-null fields are transformed into xml tag.
I supposed that obj.value being either '' or null will lead to the same result.
However this is output from Oracle 9i:
<OBJECT_ID><VALUE>abcd</VALUE></OBJECT_ID>
<OBJECT_ID><VALUE></VALUE></OBJECT_ID>
<OBJECT_ID/>
Oracle 10g behaves as expected:
<OBJECT><VALUE>abcd</VALUE></OBJECT>
<OBJECT/>
<OBJECT/>
However Oracle 9i behaviour leads me to the conclusion that oracle
must somehow distinguish between empty string and null in user defined objects...
Can someone clarify this behaviour?
Thus is it possible to test if object's field is empty or null?However Oracle 9i behaviour leads me to the conclusion that oracle
must somehow distinguish between empty string and null in user defined objects...
Can someone clarify this behaviour?
Thus is it possible to test if object's field is empty or null?A lot of "fixes" were done, relating to XML in 10g and the XML functionality of 9i was known to be buggy.
I think you can safely assume that null and empty strings are treated the same by Oracle regardless. If you're using anything less than 10g, it's not supported any more anyway, so upgrade. Don't rely on any assumptions that may appear due to bugs. -
Null and no data in field value
I transferring sql from MS Access to Oracle 9i.
In Access I have this
select * from tableOne where firstname <> ''
and firstname & '' = ''The firstname field can be edited where it could have data and the data could be deleted so I am trying to select records where firstname is not null and it has no data in it.I transferring sql from MS Access to Oracle 9i.
In Access I have this
select * from tableOne where firstname <> ''
and firstname & '' = ''
select * from tableOne where firstname IS NULL;
- or -
select * from tableOne where firstname IS NOT NULL;
as appropriate.
In Oracle there is no difference betwen being NULL and having data of length '0'
Maybe you are looking for
-
Illustrator applescript jpeg export options
Mac, Illustrator CS4, Applescript I need of a jpeg droplet that converts Illustrator files to jpegs. I was able to create one using the Image - Duplicate as JPEG.scpt script that comes with OSX by just adding .AI to the list of files to convert. The
-
Using Ubuntu-patched Xorg in Arch
Hello. I found one post where someone stated that Ubuntu-patched Xorg seems more stable than the vanilla Xorg by Arch... Therefore I tried to install it via AUR: by yaourt -S xorg-server-ubuntu But after rebooting KDM didn't start, only bash login...
-
Trackpad: hold right click +drag
Just bought a Magic Trackpad and am struggling with this. I need to be able to hold down a right / secondary click and drag a box over stuff to select it. Doing this by holding your little finger down on the secondary click and trying to drag your fi
-
People are replying to my emails with an old account
Hi, I use Mail for emails. I have a current work email and a previous work email. When i respond to an email and send it from the CURRENT work email, hours later when the person responds it ends up in the PREVIOUS email. how do i fix this? i need the
-
I am running Windows 7 and I have installed CCX Editor in XP Mode The last version worked fine however when we upgraded to 7.0(1)SR04_Build443 I uninstalled the older editor and installed the new. Now when I go to the properties of the steps I get a