Strange problem with the default location of Documents

I have recently reinstalled Windows after a hard disk failure. Fortunately, I had previously moved the library of 'My Documents' to a secondary drive, so I don't lose anything. Merge all records (i.e. move the new default library to merge with the library on my secondary drive) seemed to cause some problems with some file search programs, then my new primary drive being much bigger than my old one that I decided just to move the library of My Documents from my drive C (the OS partition).

Here's the weird part: under start > Documents (right click) > properties, I have the save location set to C:\Users\MyName, which (I think) is normally by default when you install Windows. But if I click on "restore defaults", it switches to the root of one of my secondary drives (drive E).

This is problematic because some of my games can't seem to find my old safe. Backups are in Documents > my games, but instead to find there as it should the games create a new folder 'My games' in the root directory of drive E, although I still have My Documents to save the location defined in its usual location on my primary C drive.

So I think the problems are linked, and I can't understand why by clicking on "restore default settings" on the start menu > properties of Documents it would lead to the use of the root of my E drive as the location for all the files and folders "My Documents".

I carefully edit the registry to make sure that this value is set correctly. Be sure to include the name of the final folder ('Documents') in the path. If you simply specify your user folder, all your documents will be dump it instead of inside the real documents folder.

Tags: Windows

Similar Questions

  • Strange problem with the formatting of the text

    Hello

    I had a strange problem with the formatting of the text. I created a document in Polish language and the strange thing happens when it divides the word to the next line. For example here on this part of the page, I have a word "umieszczamy", which should be divided "' u - CEF - szcza - my", but my Indesign divides in umi-eszczamy (as shown on the picture). " How can I fix it so it divides the word correctly?

    Concerning

    forum.jpg

    What language is awarded when you select the text? Hyphenation, but also the spelling, is controlled by the dictionary that is assigned to the text.

    If the language is correct, you might have to change the hyphenation in the user dictionary.

  • Strange problems with the database

    Hello

    I just got my Fuze and am very happy with it; However, I am having a very strange problem with the database. I have a 16 GB sdhc card that I use with the "rocket" and there are about 4 songs on the card that will not play and have no information charge tag. Their tags appear in the tag browser (not the in the track information screen) as just an empty rectangle. Under the track information screen, sizes are listed as ~ 4000 mb. The songs will not play and I can not jump in front of one of these songs once they were loaded.

    At first, I suspected some kind of corruption of tag, so I set out that night to track down the problem. I removed the 16 GB card and reset the player. Then, I loaded one of the corrupt in the internal memory of the player. The track has been scanned and played correctly. Then, I removed the track of the internal memory and it loaded on another SDHC card. Yet once, everything worked correctly, so I knew that the card I was using was a kind of system files or physical problem. I returned the original 16 GB sdhc card in the reader and checked that the file was still unplayable, and then I plugged the "rocket" to my computer. I transferred the unplayable file on my computer and compared (with md5sum) to the original file, thinking that if there was the file system or physical corruption the copy of the map would be damaged. However, the files were equivalent.

    To make things even more interesting, I also have problems with the registration of the kind. I have some files tagged Genres such as 'Classic' and 'Rock '. In the list of the genre, I see this:

    C

    CL

    CLA

    CLAS

    Class

    Classic

    Classic

    Classica

    Classic

    Rock

    So, there is corruption on the kind of 'Classic' but not the kind of "Rock". Each of the substrings of 'Classic' contains only a few titles, with most of the other titles listed where they should be. I checked that the tracks are labeled correctly and in exactly the same way as the other tracks that do not have this problem.

    I am at a total loss about what to do, and I'd really appreciate any advice or suggestions. I use the current firmware, 2.03.31a and the songs in question are in Ogg Vorbis format.

    MM

    Thanks for your replies.

    I managed to find what may be the problem. Tracks that received corrupt tags had the names of total path with more than 256 characters. It seems that the driver internal fat32 the rocket uses vomits all over the place when the path name is too long. Before the "rocket", I got an iPod running rockbox tags with the same directory structure that I have on the "rocket", so I don't think that this restriction on the length of the path name is a limitation or requirement of the fat32 file system. Reduce the path corrected the problem with the files being unreadable.

    However, the problem with foires genres the rest. Looking at the files show that corruption, they all have a little information in tags. Most of the information is contained in the hashes I have files that identify them via musicbrainz. The limit on the total number of characters in the tags of the track includes the "rocket" label is not read or use?

    MM

  • strange problem with the database link

    Hello world

    I have a strange problem with the link of database in Oracle 11 g Express Edition;
    There are two computers: computer-server and the client computer. Tnsnames.ora are the same on both computers IE.

    CT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof) (PORT = 1521))
    )
    (CONNECT_DATA = (SERVICE_NAME = XE)
    )
    )

    I created the database link:

    Create database link zdalny
    Connect to < user_id > identified by < password >
    using "CT".

    Customer cannot connect with server when I do not use above the command. But when I change 'use' for using "krzysztof:1521" or by using "krzysztof" or "server IP:1521" - everything is ok.

    Why I ask. Because in all the materials that I read about Oracle command with the help of "CT" should work correct. But there is no. Do you know why?

    Thanks in advance and apologize me for my English.

    Rgds
    Krzysztof

    Here's the tnsnames of your server, but to connect to the oracle server db (any client or to another instance of db oracle), you must install oracle client.
    However, in your condition, you want to connect the DB1 Oracle OracleDB2 using a link db, I'm right? In this case you should always set the entry in the tnsnames.ora
    To verify that you can connect to Oracle DB2 from DB1 Oracle, you can use tnsping in the command line.
    In your case

    c:\tnsping CT
    

    Krzysztof Szymaniak wrote: CT =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof) (PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    )
    )

    Check your tnsnames entry in the machine, you are trying to connect to. And check if the tnsping is successful.
    Sometimes the error message says not everything, which means that you need to troubleshoot yourself and learn from the experience.
    Always in the opposite case, refer to the documentation.

    See you soon.

    Published by: Spongebob December 14, 2011 09:30

  • Strange problem with the keyboard event listener

    I have a full screen touch app. To close the application, I set an event listener on keyboard for the key "0". I don't want the press user due to some restrictions Alt + F4 key combination. Problems begin when the application loses focus. Here's the code;

    protected function onComplete(event:FlexEvent):void
    {

    this.setFocus ();
    this.addEventListener (KeyboardEvent.KEY_DOWN, trapKeys, true, 0, true);

    }

    private void trapKeys(e:KeyboardEvent):void {}

    If (e.keyCode == 96) {}
    This.Close ();
    }

    Else if (e.keyCode == 48) {}
    This.Close ();
    }

    }

    When the user change the screen to a different with Alt + TAB application, or any other combination of keys flex app loses focus and does not work when he turns back to my app "0". How can I solve this problem?

    Thanks in advance.

    Hi, Ahmed.

    I have absolutely no problem with the solution you are trying to set up - you use mode full-screen interactive mode of keyboard?

    Please consider:

    on full add keyboard listener

    protected function applicationCompleteHandler(event:FlexEvent):void

    {

    this.stage.addEventListener (KeyboardEvent.KEY_DOWN, trapKeys);

    };

    //

    protected function applicationActivateHandler(event:AIREvent):void

    {

    If (this.stage)

    {

    switch the State to display full-screen when activated

    If (this.stage.displayState! = StageDisplayState.FULL_SCREEN_INTERACTIVE)

    {

    this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

    };

    };

    };

    //

    private var exitHandled:Boolean = false;

    on NUMBER_0 | NUMPAD_0 exit-close

    protected function trapKeys(event:KeyboardEvent):void

    {

    If ((event.keyCode is Keyboard.NUMBER_0

    || event.keyCode is Keyboard.NUMPAD_0)

    (& this.exitHandled == false)

    {

    exitHandled = true;

    this.stage.removeEventListener (KeyboardEvent.KEY_DOWN, trapKeys);

    This.Close ();

    };

    }

    (Note: applicaton of the events 'applicatonComplete' and "applicationActivate" are routed to over managers)

    Kind regards

    Peter

  • Strange problem with the license...

    Hi all!

    I have a very strange problem and I got nowhere with navigation on all ads in this forum. My environment is as follows:

    An ESX 3.5 update 3 Server with 2 cards integrated network interface and two Intel Quad Port cards VT. I put the on board to be the port of the console and the other on board to be the network of Virtual Machines. Here are the two separate networks, separated by a Cisco firewall. The IP of the console is 10.10.10.10 and virtual machines are on a network of 172.16.10.x. I also have a VC (physical) server with network cards two, one on the 10.10.10.x network and the other network 172.16.10.x. I installed the license server on the VC, and she won the 172.16.10.x listening address (although I discovered he will listen on the network 10.x.x.x). Then I edited the file hosts on the ESX Server to include the VC server using a name resolution. I ping the name/address of the server successfully. I also have my firewall configured to allow all traffic between two networks (as long as the traffic is initiated by the 10.10.10.x network). I cannot see any errors or not on the firewall.

    The strange thing is that I am able to the ESX by VC license but it stays there for a little while and then loses the configuration. Then, I try to do it again without success. I point to the assessment option and it works again. I then point to the license server and takes it. I can do the same thing on the ESX itself with similar results. I tried to use the name of host or IP address; exact same results. The error simply indicates that the server could not find the license server.

    The really strange thing is that even when the server is authorized, any action I do on the server (configuration, start and stop VMs, etc) is extermely slow and some of them simply because of time.

    Did anyone have clues here? I'm lost...

    Thank you in advance. ?:|

    Tom

    Hi BDHHI.

    Do not know if she could solve your problems but... According to what you say, the license server becomes the 172... interface as the default interface. Go to network connections-> Advanced Options-> advanced settings and make sure that the interface with 10.10 IP... is on top, services will have this default IP address.

    On which network will be launching connection, maybe I'm wrong, but that it could be open in both directions.

    Kind regards

    AlexNG

  • Problem with the backup location Photo

    I just started using LR 4 for the first time.  On my first import, that I chose newly imported backup photos automatically on a device of spare hard drive on my Mac that I hadn't previously used.  After I finished with LR, I closed out of the app.  So I decided (Yes, it seemed a good idea at the time) to rename the hard drive, I decided to use for backups of my photo for "Photo Backup Drive.  However, when I then open LR, the ability to record automatic backups is grayed out.

    The option still listed the former name of the hard drive, so I went back in and renamed that animate its original name.  Back in LR, the option was nevertheless still grayed out.  You can see the name of path (initially selected before I renamed the reader), but the check box is not available and you cannot change the option.  It seems that the program was not able to recognize the change of name of path and then just locked up.  Does anyone know a way to reset this option from one location other than the normal selection point?

    Note, this is the place for my photos of automatic backup, not the rear location for my catalog (which is always the default file location 'Photos' and works very well).

    OK, problem solved.  It was not at all a problem of LR.  I didn't realize that when first go you back in the window "import" the Central selection automatically default the option "add" (to import a photo without moving or copying this).  Therefore, if you choose "Copy" or "copy as DNG' rather than 'Add', the possibility to choose a location for an automatic backup becomes non-greyed and the tick becomes available.  You can then use the selector drop-down list of re - choose the location of your backup files (and it recognizes the current name of everything that you hard drives, even if you changed just one of them).  You can then delete any old path names.

    It was just a coincidence that she appeared to grey out after that I changed the name of the drive.

    Thanks to everyone who watched it and started trying to find an answer.

  • Satellite L850 - 1 H 4 - a strange problem with the FN key

    Hello

    I have a strange problem on my laptop. When I uninstall my PVAT my start "FN" key works, when I install it it s not working not properly. Its market not only the volume key (F9 and F10) without pressing the "Fn", if I want to press F9 or F10 I have to press FN + F9, even with the rest of the buttons.

    When I install PVAT I have to press FN, so I can use my F keys (e.g. F3 to search on the browser tool, alt + f4 - I have to press Fn + alt + f4), and I can't use real functions like mute, disable Touchpad etc. Use the volume keys only. Y at - it a problem if I run my computer without PVAT, this may affect its performance?

    Where could be the problem and can I fix it? I'm with Windows7 x 64, but the laptop was with no OS when I bought it. And there is a problem with this version, I bought its impossible to install the Pakc3 Service, it s with SP1, can be the problem? I put t know what to do... perhaps I run the laptop without PVAT, sounds good, because the buttons work fine without it, but I don't know if it interacts with something else.

    Thanks in advance!

    Its possible to use the function buttons by pressing another button without the use of the fn or FN.
    This option can be changed in the BIOS.

    Go to the BIOS by pressing F2.
    In the BIOS, choose Advanced-> system configuration Options
    Here you should find the option that allows to change the special function keys which allows you to use the function FN or without button Fn button

    By the way: this theme has already spoken here in the forum several times. therefore recommend that you use the advanced search to Forums before posting new thread

  • Strange problem with the KING and IMAQ find right 3 edges

    So first of all, I noticed that the KING produced by KING features seems to have an incompatibility with the entrance to find right IMAQ 3 edges:

    In my code, I have the strange problem "IMAQ find right edges 3" is the production of edges that lie outside the limits by the wired KING specifided: "."

    In this case, a return on investment, defined by a rectangle, I [476, 1559, 752, 1779], but the best line produced by VI shape is outside this rectangle (see ordered 1876).

    How is that possible?

    I finally thought to it - it was my fault. I was updating the global rectangle in the KING entered correctly, but not the contours.

    I fixed the wiring and now it works fine.

    Detective Conan!

    G

  • problem with the htm file firsefox document, becomes it removed and deleted

    I have a white screen which displays the file as 'file:///C:/Users/Mark/AppData/Local/Temp/Magentic/Mag3075.htm', is unable to get rid of it, can someone give me a simple step by step direction to remove it and get out of my computer, the magnetic program has been removed, but still have files, this isn't one of them.

    First make sure you can see hidden files/folders by going to start / Control Panel / folder Options / view and check the box show hidden and system files.  While there, also uncheck to hide extensions of known file types (this will be useful to you later).

    Go to http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx and get Autoruns and run it to check your startup items.  Search for this file.  If you find it, delete it or uncheck the box allowing it to boot at startup.  Will not get rid of the file itself, but it must stop the logon dialog box (a step in the right direction).  Restart after you did it to see if it still appears.  If so, return here after having tried other options that follow.

    Now open Windows Explorer and go to that location and select the file and click on delete.  I guess you have tried this and it didn't work.  It gives you an error message when you try?  What is the EXACT text of this error (including all codes)?

    Try to use one of the following free products to remove the file/folder.  Unlocker to: http://www.softpedia.com/get/System/System-Miscellaneous/Unlocker.shtml or file Assassin http://www.malwarebytes.org/fileassassin.php (with or without forcing the deletion: http://www.mydigitallife.info/2008/12/27/force-delete-cannot-delete-locked-or-in-used-files-or-folders-with-fileassassin/). These programs often work when normal functions remove Vista not work correctly.

    If you are unable to file (getting an "Access denied" error while trying to to navigate on this one), you will need to change the permissions for folders and files to give you the permissions of all rights, even appropriating. You may need to go to advanced to check special permissions to see if there is any restrictions there including inherited properties of parent folders). Here are some instructions on how to do

    To view your permissions, right-click on the file/folder, click Properties, and check the Security tab.  Check the permissions you have by clicking on your user name (or group of users).  Here are the types of permissions, you may have: http://windows.microsoft.com/en-US/windows-vista/What-are-permissions.  You must be an administrator or owner to change the permissions (and sometimes, being an administrator or even an owner is not sufficient - there are ways to block access (even if a smart administrator knows these ways and can move them - but usually should not because they did not have access, usually for a very good reason).)  Here's how to change the permissions of folder under Vista: http://www.online-tech-tips.com/windows-vista/set-file-folder-permissions-vista/.  To add take and the issuance of right of permissions and ownership in the right click menu (which will make it faster to get once it is configured), see the following article: http://www.mydigitallife.info/2009/05/21/take-and-grant-full-control-permissions-and-ownership-in-windows-7-or-vista-right-click-menu/.

    To resolve this problem with folders, appropriating the files or the drive (as an administrator) and give you all the rights.  Right-click on the folder/drive, click Properties, click the Security tab and click on advanced and then click the owner tab.  Click on edit, and then click the name of the person you want to give to the property (you may need to add if it is not there--or maybe yourself). If you want that it applies to subfolders and files in this folder/drive, then check the box to replace the owner of subcontainers and objects, and click OK.  Back and now there is a new owner for files and folders/player who can change the required permissions.  You can change now switched to read-only (even if the main folder indicates that they are always read-only - you can access yourself as the owner).  You can keep them in read-only to other users, customers and administrators even (although they can support themselves and access, if they wish, and it is really not that you can do to stop it except protect the file with a password by using a 3rd party product.)  Here is more information on the ownership of a file or a folder: http://www.vistax64.com/tutorials/67717-take-ownership-file.html.  To add take ownership in the menu of the right click (which will make it faster to get once it is configured), see the following article: http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/.

    Once you have the appropriate permissions and ownership if necessary, you should be able to delete the file normally or with one provided above both programs.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Strange problem with the new ca and on Satellite M45 mouse adapter

    Hello

    Recently, my adapter had problem with load the laptop (model M45-S2692), so I bought another card. The new adapter has worked for a few months and now its behave differently.

    If I plug the adapter into the laptop, the mouse does not work and works otherwise.

    Does anyone have an idea on what could be the problem.

    Please advise.

    Concerning
    Suri

    Hey Buddy,

    Therefore, may I ask if the adapter that was purchased is an original toshiba AC adapter? Why didn t contact you a servicepartner, since they had probably had your sector-free adapter because you have something called guaranteed.

    How Don t you know the adapter you have, there where he knows do not so it s original or not, do not damage anything on your motherboard for your machine.
    Maybe it has nothing to do with your power adapter...

    I would appreciate comments on your part just a small one description which CA is, when you bought your machine and if the error could be reproduced with the removal of the AC.

    Welcome them

  • Strange problem with the keyboard

    Hello.
    I have problem with my keyboard. It works with delays. I don't know how to fix it.

    Hello

    What do you mean by working with delays?
    As far as I know, you can change the keyboard settings in the keyboard properties.
    Also, if you think that it s not a fault or parameters of software problem but hardware malfunction, you can try to contact the service agent.
    But before you contact the ASP you should recover the operating system.

    Good bye

  • strange problem with the PC just stops

    Hello

    I have a user who has a PC that keeps closing.  Well, I should say two PC.  After fighting with the issue works for several months and not getting anywhere, we decided maybe the 1st PC (Dell Optiplex 755) has just had a bad image or something and decided to give it just a PC brand new (Dell Opiplex 760).  Put a new picture on it and the applications she needs and bam... it is always set to zero.  The only things off the previous PC I parked has its Favorites IE, my Docs and desktop icons.  I thought it was just turn off then I swapped the surge by hope protector and has no good.  I spoke with the user and she says each time it shutsdown she gets a message "Windows is shutting down."  So, for me, it seems that there is something which is indicative of his PC through the shutdown process.

    After some research on his new PC, it seems that when restarting PC that this trend is coming in the case Log - in order of first at the last before the reboot.  I have attached the error and the description given when opening the error message in the event viewer.

    Userenv
    Windows cannot unload your registry file classes - it is still used by other applications or services. The file will be unloaded when it is no longer in use.

    Userenv 2
    Windows saved user PROD\patricyo registry while an application or service was still using the registry during log off. The memory used by the registry of the user has not been released. The registry will be unloaded when it is no longer in use.
    This is often caused by services running under a user account, try configuring the services to run in the NetworkService or LocalService account.

    ATISmart
    The service has started

    LMS
    LMS Service started

    PC Anywhere
    Host started
    Connection object: "C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere\Hosts\pcaNSHost.bhf"
    Device type: TCP/IP
    Serial number: 0001-067A-0000-0000-0000-0000

    EACH
    Notification of the user service Intel (r) began.

    Security Center
    The Security Center service has stopped.  He was prevented from running by a software group strategy.

    Micorsoft Fax
    Fax service failed to initialize devices (virtual or TAPI) awarded faxes. Faxes cannot be sent or received until a fax device is installed.

    Microsoft Fax 2
    The outgoing routing rule is not valid because it cannot find a valid device. The outgoing faxes using this rule will not be routed. Check that the devices or target device (if it is routed to a group of devices) is connected properly installed and activated. If routed to a group, make sure that the group is configured correctly. Country code: ' *' area code: ' *'

    When your PC works fine for 3 or 4 days this chain of events is not displayed.  There are only political messages.  Have you ever seen something like that before or have any idea where I might start?  :)

    Thank you

    Rich

    It's funny.  It ends up being the user had a key on the keyboard value 'Shutdown' PC.  Some _ of Belkin keyboard.  Finally, she said "I think it happened shortly after clicking this key."  It was after we gave him a new PC since the follow-up of the matter on the image of the all-new and fresh PC.

    Funny stuff.  I love, hate my work :)

  • Problem with the default value for OAMessageTextInputBean to the controller layout

    Hello

    I encountered this problem when I expand a controller for the page create a work request (/ oracle/apps/eam/workrequest/webui/EAM_WR_WORK_REQUEST_DETAIL_PL). My goal is to re - fill OAMessageTextInputBean 'Additional Description' after the user clicks "Save" or "apply". When I try to change the value of another field, it works correctly, the problem persists for 'Description Addidional' more precisely. I don't know that I have the correct id (I took it from xml received by jdr_utils.printdocument). The journal does not all controllers running after the attempt to set the value.

    Compare these logs:

    [21]:PROCEDURE:[xxfideltronik.oracle.apps.eam.workrequest.webui.xxPageRegionCO]:Goosfraba, pre-added!
    [21]:EVENT:[fnd.framework.webui.OAMessageTextInputHelper]:OAF LOG: Event : Get Attribute Value, in: oracle.apps.fnd.framework.webui.OAMessageTextInputHelper: View:null ,Attribute:EAM_WR_WORK_REQUEST_DETAIL_PL426_EamWrRqlog , Return Value without datatype conversion :4321
    [21]:PROCEDURE:[xxfideltronik.oracle.apps.eam.workrequest.webui.xxPageRegionCO]:Goosfraba, added!
    

    [Descriptive information, does not work]

    and:

    [64]:PROCEDURE:[xxfideltronik.oracle.apps.eam.workrequest.webui.xxPageRegionCO]:Goosfraba, pre-added!
    [64]:EVENT:[fnd.framework.webui.OAMessageTextInputHelper]:OAF LOG: Event : Get Attribute Value, in: oracle.apps.fnd.framework.webui.OAMessageTextInputHelper: View:RequestDetailsVO ,Attribute:PhoneNumber , Return Value without datatype conversion :null
    [64]:EVENT:[fnd.framework.webui.OAMessageTextInputHelper]:OAF LOG: Event : Set Attribute Value, in: oracle.apps.fnd.framework.webui.OAMessageTextInputHelper: OldValue:null ,New Value:4312
    [64]:PROCEDURE:[xxfideltronik.oracle.apps.eam.workrequest.webui.xxPageRegionCO]:Goosfraba, added!
    

    [Phone number, works fine]

    Here is my code for the method of the processFormRequest controller:

    public void processFormRequest(OAPageContext pgCtx, OAWebBean wBean){
         super.processFormRequest(pgCtx, wBean);
        
         String description = pgCtx.getParameter("EamWrRqlog");
         log("Goosfraba: " + description, pgCtx);
    
         if(description != null){
              OAMessageTextInputBean additionalDescription = (OAMessageTextInputBean) wBean.findChildRecursive("EamWrRqlog");
              if(additionalDescription != null){
                   log("Goosfraba, pre-added!", pgCtx);
                   additionalDescription.setValue(pgCtx, description);
                   log("Goosfraba, added!", pgCtx);
              }
         }
    }
    

    A solution would be: -.

    1. create a transitional VO with an attribute, LongDescription.

    2 associate this attribute with the EamWrRqlog field.

    3. in the processFormRequest, set the TransientVO attribute value

  • problem with the default value of the parameter in function

    Hi all
    create or replace FUNCTION date_post_message (
    user_lock_in  IN  users.user_lock%TYPE,
    form_type_in  IN users.form_type%TYPE DEFAULT 0 ,
    date_in       IN                       DATE)
    RETURN BOOLEAN
    IS
    v_num number(1);
    BEGIN
    IF user_lock_in = 1 THEN
       RETURN FALSE;
    END IF;
    IF form_type_in NOT IN (1,2) THEN
       RETURN FALSE;
    END IF;
      SELECT 1
      INTO v_num
      FROM changes
      WHERE date_post_msg <= date_in ;
      RETURN TRUE;
    exception
    WHEN NO_DATA_FOUND THEN
    RETURN FALSE;
    END date_to_post_msg;
    problem: there is null, the function ignore the form_type_in default value 0.
    Why? the default value is valid only in the parameter of the procedure?
    Thanks to Advnaced
    Naama

    Naama wrote:
    If a value is null to convert it to 0? I mean in the part of the statement of the parameter

    No, can't do this in the signature. You will need to manage this by validating the parameters passed at the beginning of the function.

    It is quite simple. In your case, you might as well test for NULL and fail to function like this:

        FUNCTION date_post_message(
                user_lock_in IN NUMBER,
                form_type_in IN NUMBER DEFAULT 0 ,
                date_in      IN DATE)
            RETURN BOOLEAN
        IS
            v_num NUMBER(1);
        BEGIN
            dbms_output.put_line('Value of parameters : user_lock_in : '||user_lock_in || ' : form_type_in : '||form_type_in||' : date_in : '||date_in );
            IF user_lock_in = 1 THEN
                RETURN FALSE;
            END IF;
            IF form_type_in IS NULL THEN
                RETURN FALSE;
            ELSIF form_type_in NOT IN (1,2) THEN
                RETURN FALSE;
            END IF;
            RETURN TRUE;
        EXCEPTION
        WHEN NO_DATA_FOUND THEN
            RETURN FALSE;
        END;
    

    In other cases of use I would issue a local variable and treat it like this:

            IF form_type_in IS NULL THEN
                l_form_type := 0;
            ELSE
                 l_form_type := form_type_in;
            END IF;
    

    Of course, the code should use the local variable rather than the parameter.

    It is a good practice to validate values passed in parameters at the beginning of a function. If you really want to go to the city, discover the Design By Contract.

    Cheers, APC

    Published by: APC on November 9, 2011 13:36

    Example added, as requested by OP

Maybe you are looking for