Setting up directory object for emailing attachments

Hi,
I am having trouble trying to send emails with attachments. I have downloaded and created the the demo_mail package and the pdf_mail procedure. I also have the send_email_attach procedure using utl_mail.
I am not sure, or familiar on setting up the directory object. I don't have privileges to do this so I need to understand exactly what needs to be done so I could relay it to my dba.
In the Send_email_attach procedure there is this code
"fHandle := UTL_FILE.FOPEN('/Source/Apps/prod/reports', 'mypdf.pdf', 'r');" I put the directory path the file is in as the first argument and the name of my pdf in the second one. When I run it, it gives me an error:
ORA-20001: The following error has occured : ORA-29280: invalid directory path
I'm thinking I need the directory object in the first argument? Is this correct. And then do I put the file in the directory path that the directory object points to? and keep as the second argument?
using the pdf_mail procedure it sends the email but the attachment in the email is bad. Acrobat just says: Acrobat reader could not open '~6034454.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly formated).
This is the code I use to call it:
pdf_mail('myemail',
'another email',
'This is a test',
'Hope it works',
'/Data/oracle/product/10g__BI/tools/web/icons/myicons/mypdf.pdf',
EMPTY_BLOB());
I am not sure what to put in the last two arguments. In the next to last argument I put the path where the file is and in the last argument I put EMPTY_BLOB() call. If I put the name of the pdf in quotes it gives me an error ORA-06550: wrong number or types of arguments in call to pdf_mail.
I'm not sure how to reference the files or the directory.
any help would be greatly appreciated.
thanks

You need to use a directory object to do this properly. If you don't have privileges then get them...
The UTL_FILE_DIR parameter has been deprecated by oracle in favour of direcory objects because of it's security problems.
The correct thing to do is to create a directory object e.g.:
CREATE OR REPLACE DIRECTORY mydir AS 'c:\myfiles';Note: This does not create the directory on the file system. You have to do that yourself and ensure that oracle has permission to read/write to that file system directory.
Then, grant permission to the users who require access e.g....
GRANT READ,WRITE ON DIRECTORY mydir TO myuser;Then use that directory object inside your FOPEN statement e.g.
fh := UTL_FILE.FOPEN('MYDIR', 'myfile.txt', 'r');Note: You MUST specify the directory object name in quotes and in UPPER case for this to work as it is a string that is referring to a database object name which will have been stored in uppercase by default.

Similar Messages

  • How can I set up auto respond for email

    How can I set up auto respond for email?

    Hey there jimmac169,
    It sounds like you want to have the Mail app automatically reply to emails that come in. You can do this in the app itself, but in order for the function to work, Mail needs to be open. Take a look at this info from the following article:
    Mail (Yosemite): Reply to, forward, or redirect messages
    Automatically reply to or forward messages
    Mail must be open before it can automatically forward or reply to messages. If you want to send automatic replies when Mail isn’t open—like when you’re on vacation—check with the provider of your email account. 
    Choose Mail > Preferences, then click Rules.
    Click Add Rule, then type a name for the rule.
    Indicate whether any or all of the conditions must be true for the rule to be applied.
    Set the conditions that determine which messages to automatically reply to or forward.
    Choose options from the “Perform the following actions” pop-up menu.
    Forward messages: Choose Forward Message from the first pop-up menu, then enter the email addresses where you want to receive the forwarded messages. Click Message, then enter any text you want to include with the forwarded message. For example, you could explain that you’re automatically forwarding messages. 
    Reply to messages: Choose “Reply to Message” from the first pop-up menu, click “Reply message text,” then enter your reply. Mail includes the full text of the original message in your reply. 
    Click OK.
    Carefully consider the rules you create. If they’re too broad, messages can be sent inadvertently or create loops (replies to replies you sent). If possible, test the rules. 
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • HT201320 how do i set up read receipts for emails from the iphone?

    how do i set up read receipts for emails from the iphone?

    That is not a feature of the Mail app. Check with your email provider to see if it's a service they offer.

  • Unable to set working directory (-2147024832) for some app installs

    I've found several drivers on a Dell Laptop that don't play well with others in MDT 2012, so I started making an application install package for them instead.  Most of them fail with an "unable to set working directory" error.  I checked
    the app install logs and they don't really make any sense to me.  I know the process as a whole works, because I can install .Net 4.0 runtimes without any problems using the same method.  The important bits of the ZTI App log are below.  Would
    be for any guidance on this, as I'm stumped and none of the searches on the exact errors are of much help.
    A sample error returned in the wizard is:
    WARNING - unable to set working directory (-2147024832)Error installing application Dell 3440_Chipset_Driver_JD3WN IMEI drivers 9.5.3.1520_A00: The system cannot find the file specified.
    The ZTIApplication.log file contains the following... the first is one that works (.NET 4), the second is one that fails. (Not using code block for this one, it doesn't like it).
    <![LOG[Validating connection to \\ITSASERVER\DeploymentShare$\Applications\Microsoft .NET 4.0 runtime 4.0]LOG]!><time="08:20:30.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1"
    thread="" file="ZTIApplications">
    <![LOG[Already connected to server ITSASERVER as that is where this script is running from.]LOG]!><time="08:20:30.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread=""
    file="ZTIApplications">
    <![LOG[ Change directory: \\ITSASERVER\DeploymentShare$\Applications\Microsoft .NET 4.0 runtime 4.0]LOG]!><time="08:20:30.000+000" date="09-27-2013" component="ZTIApplications"
    context="" type="1" thread="" file="ZTIApplications">
    <![LOG[ Run Command: \\ITSASERVER\DeploymentShare$\Tools\X64\bddrun.exe dotNetFx40_Full_x86_x64.exe /norestart /passive]LOG]!><time="08:20:30.000+000" date="09-27-2013"
    component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[ZTI installing application ]LOG]!><time="08:20:30.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[Event 41031 sent: ZTI installing application ]LOG]!><time="08:20:30.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[About to run command: \\ITSASERVER\DeploymentShare$\Tools\X64\bddrun.exe dotNetFx40_Full_x86_x64.exe /norestart /passive]LOG]!><time="08:20:30.000+000" date="09-27-2013" component="ZTIApplications" context=""
    type="1" thread="" file="ZTIApplications">
    <![LOG[Command has been started (process ID 3212)]LOG]!><time="08:20:30.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[ZTI Heartbeat: command has been running for 0 minutes (process ID 3212)]LOG]!><time="08:20:31.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread=""
    file="ZTIApplications">
    <![LOG[Event 41003 sent: ZTI Heartbeat: command has been running for 0 minutes (process ID 3212)]LOG]!><time="08:20:31.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1"
    thread="" file="ZTIApplications">
    <![LOG[Return code from command = 0]LOG]!><time="08:23:48.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[Application Microsoft .NET 4.0 runtime 4.0 installed successfully]LOG]!><time="08:23:48.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[Event 41033 sent: Application Microsoft .NET 4.0 runtime 4.0 installed successfully]LOG]!><time="08:23:48.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread=""
    file="ZTIApplications">
    <![LOG[Property InstalledApplications001 is now = {9abb5842-9a8e-45c5-9268-4fa4e69dba34}]LOG]!><time="08:23:48.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread=""
    file="ZTIApplications">
    <![LOG[Application Microsoft .NET 4.0 runtime 4.0 needs a reboot, initiating.]LOG]!><time="08:23:48.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread=""
    file="ZTIApplications">
    <![LOG[Dependent application requested a reboot]LOG]!><time="08:23:48.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[Property SMSTSRebootRequested is now = true]LOG]!><time="08:23:48.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[Property SMSTSRetryRequested is now = true]LOG]!><time="08:23:48.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[Exiting to initiate a reboot with retry (to pick up where we left off)]LOG]!><time="08:23:48.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread=""
    file="ZTIApplications">
    <![LOG[ZTIApplications processing completed successfully.]LOG]!><time="08:23:48.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[Event 41001 sent: ZTIApplications processing completed successfully.]LOG]!><time="08:23:48.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[################]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[Entry: {dee65f94-e269-4eac-927d-6e06c0e0eb9d}]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[Name:  Dell 3440_Chipset_Driver_JD3WN IMEI drivers 9.5.3.1520_A00]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread=""
    file="ZTIApplications">
    <![LOG[################]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[Validating connection to \\ITSASERVER\DeploymentShare$\Applications\Dell 3440_Chipset_Driver_JD3WN IMEI drivers 9.5.3.1520_A00]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context=""
    type="1" thread="" file="ZTIApplications">
    <![LOG[Already connected to server ITSASERVER as that is where this script is running from.]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread=""
    file="ZTIApplications">
    <![LOG[ Change directory: \\ITSASERVER\DeploymentShare$\Applications\Dell 3440_Chipset_Driver_JD3WN IMEI drivers 9.5.3.1520_A00]LOG]!><time="08:25:04.000+000" date="09-27-2013"
    component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[WARNING - unable to set working directory:  (-2147024832)]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context="" type="2" thread="" file="ZTIApplications">
    <![LOG[ Run Command: \\ITSASERVER\DeploymentShare$\Tools\X64\bddrun.exe Setup.exe -s]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications"
    context="" type="1" thread="" file="ZTIApplications">
    <![LOG[ZTI installing application ]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[Error executing web service http://ITSASERVER:9800/MDTMonitorEvent/PostEvent?uniqueID=2a0f4469-d803-4976-b434-adbf06b85c23&computerName=Lat3440_0927b&messageID=41031&severity=1&stepName=Install Applications&currentStep=61&totalSteps=88&id=4C4C4544-0031-4610-8053-B7C04F4C5731,E0:DB:55:AC:48:1C&message=ZTI
    installing application &dartIP=&dartPort=&dartTicket=&vmHost=&vmName=: The server name or address could not be resolved
     (-2147012889)]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[Event 41031 sent: ZTI installing application ]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[About to run command: \\ITSASERVER\DeploymentShare$\Tools\X64\bddrun.exe Setup.exe -s]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread=""
    file="ZTIApplications">
    <![LOG[Error installing application Dell 3440_Chipset_Driver_JD3WN IMEI drivers 9.5.3.1520_A00: The system cannot find the file specified.
    ]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context="" type="3" thread="" file="ZTIApplications">
    <![LOG[Error executing web service http://ITSASERVER:9800/MDTMonitorEvent/PostEvent?uniqueID=2a0f4469-d803-4976-b434-adbf06b85c23&computerName=Lat3440_0927b&messageID=41032&severity=3&stepName=Install Applications&currentStep=61&totalSteps=88&id=4C4C4544-0031-4610-8053-B7C04F4C5731,E0:DB:55:AC:48:1C&message=Error
    installing application Dell 3440_Chipset_Driver_JD3WN IMEI drivers 9.5.3.1520_A00: The system cannot find the file specified.
    &dartIP=&dartPort=&dartTicket=&vmHost=&vmName=: The server name or address could not be resolved
     (-2147012889)]LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    <![LOG[Event 41032 sent: Error installing application Dell 3440_Chipset_Driver_JD3WN IMEI drivers 9.5.3.1520_A00: The system cannot find the file specified.]
    <![LOG]!><time="08:25:04.000+000" date="09-27-2013" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
    Why can't it find it or set the working directory, especially when it's already validated that it's there?  
    --smthng

    I'm not familiar with how Dell does their client side software, but for the server-side software (my area of expertise), I've always done something like the following:
    I recommend running every application install in a VBScript/Powershell wrapper.  You get logging for the application back on your SLShare as well as its cleaner (you can replace Drivers A05 with A06 by changing the script, rather than editing the application
    in MDT).
    sApplicationName = "Dell 12G Chipset"
    oLogging.CreateEntry "Install-" & sApplicationName & ": Starting " & sApplicationName & " installation", LogTypeInfo
    '//Set Destination Folder
    sDestFolder = "c:\temp\"
    '//Set Source Install Directory
    sSourceDir = oUtility.ScriptDir
    sSourceDir = sSourceDir & "\Source"
    '//Check that folder exists, if not, create it.
    oLogging.CreateEntry "Install-" & sApplicationName & ": Check that " & sDestFolder & " exists.", LogTypeInfo
    if not oFSO.FolderExists (sDestFolder) then
    oFSO.CreateFolder sDestFolder
    End If
    '//Copy folder from MDT share to C:\Temp
    oLogging.CreateEntry "Install-" & sApplicationName & ": Copy from " & sSourceDir & " to " & sDestFolder, LogTypeInfo
    oFSO.CopyFolder sSourceDir, sDestFolder
    '//Sleep for 2 seconds to allow copy to finish
    wscript.sleep 2000
    sFile = sDestFolder & "Source\setup.exe"
    '// Check if file/folder exists
    If not oFSO.FileExists(sFile) then
    oLogging.CreateEntry "Install-" & sApplicationName & ": " & sFile & " was not found, unable to install " & sApplicationName & "", LogTypeError
    ZTIProcess = Failure
    Exit Function
    End if
    '// Create log entry to show file being run
    oLogging.CreateEntry "" & sFile & " -s", LogTypeInfo
    iRetVal = oUtility.RunWithHeartbeat("" & sFile & " -s")
    if (iRetVal = 0) or (iRetVal = 3010) then
    ZTIProcess = Success
    Else
    ZTIProcess = Failure
    End If
    wscript.sleep 15000
    '// Disable Zone Checks
    oEnv("SEE_MASK_NOZONECHECKS") = 1
    '//Folder Cleanup
    oFSO.DeleteFolder sDestFolder & "Source"
    I always copy any drivers that are installed after the fact (everything for me other than SAS/NIC drivers) to the C:\Temp as it can break.  I always update my NIC drivers during the build to the latest Dell software using their packs.  I try to
    not mess with my boot image unless I'm adding a new model that is not supported by the built-in drivers.

  • What program should i use to open pdf files, documents for email attachments. Adobe is not working

    I can not open any email attachments-large or small. I had adobe and switched to internet explorer.  I do not have any other choices on my computer to pick from other than word pad and it opened the attachment but was not readable. 

    Please download and install the latest version of Acrobat Reader from the following weblink that will help you to open and read all the PDF files:
    http://get.adobe.com/reader/
    I am an HP employee.
    Regards,
    Vidya
    Make it easier for other people to find solutions, by marking my answer “Accept as Solution” if it solves your problem.
    ***Click on "Thumbs up" button to the bottom right side of my post to say thanks!***

  • Set default directory/path for SaveAs Dialog using WPG_DOCLOAD

    Hi, im trying to set the default directory/path for the SaveAs Dialog called by wpg_docload.download_file.
    I'm not able to find where I can specify the default path.
    Is it something like "htp.p('Content-Disposition: attachment; path=:PX_OUTPUT_DIR" ?
    Thx for your help !
    Here's a part of my code
    owa_util.mime_header( NVL(mime,'application/octet'), FALSE );
    htp.p('Content-length: ' || length);
    htp.p('Content-Disposition: attachment; filename="'||substr(fileName,INSTR(fileName,'/')+1)|| '"');
    owa_util.http_header_close;
    wpg_docload.download_file( lobLoc );
    /*********************/

    I don't believe you're allowed to set the directory path in the Content-Disposition (or any other) header. More accurately, you can set path in the filename, but browsers don't pay any attention to that, they only look at only the terminal filename.
    <p>According to RFC 2183, browsers are supposed to ignore any path information sent with the filename. Even though it's dated 1997, I believe this RFC is still in effect.
    <p>This was done as a security precaution against malicious web apps that might try to download into a system directory or other dangerous place. Also, browsers (usually) allow users to specify their own default download directories. Further, even if you could specify the path, you'd have to do it for any and all filesystems (Linux, Mac HFS, Mac OSX, Windows, etc etc).

  • How to get meta data for email attachments in iphone?

    Hi am new to iphone programming,i want to get the meta data for the emails attachments in the inbox of the iphone to be listed the emails with attachment.

    Hi..
    You have to use SWC_GET_ELEMENT CONTAINER '( string name of your attribute)' your_attribute.
    All attributes are part of container issue.. SWC_GET_ELEMENT command can give you these values.
    Hope to help...

  • Apps for email attachments

    Are there any apps that allow email attachments to be opened.  I can't open wmv or any other attachments that I receive until I get to my computer.  I have searched the apps catalog on my Palm Pre, but can't seem to locate anything that works.
    Post relates to: Pre 2 p102eww (Verizon)

    Your Pre can open any attachment that has support for the file format.
    MicroSoft's .wmv format is not supported.  Page 142 of the Verizon Pre 2 User Guide states:
    "You can view DRM-free videos that you receive as email attachments or
    that you copy from your computer in the MPEG-4, H.263, H.264, MP4,
    M4V, 3GP, 3GPP, 3G2, and 3GP2 formats. You can view videos you open in
    a multimedia message in MP4 format. Videos play on your phone in
    landscape orientation."
    WyreNut
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • Is a script available to set a default background for email messages?

    I am new to the community, not to Mac though. Currently I am on a new MacBook Air, Lion installed.
    I had a couple of minor issues about mail, the first I solved myself using automator, and succeding in sending an attachment file from finder. It went on working also after the upgrade from snow leopard to lion.
    I could not find out how to set a specific default background for new email messages (e.g. a color, or a certain template); I do not want to do it everytime for each message. I tried automator, the workflows runs ok, tried to save it as service for mail and for finder but it did not catch; as application it works, but veeeery slow.
    When I pull down the mail window, the Services line says "no services available".
    Anyone who worked on this?
    thanks

    Hi ..
    That's not possible as yet but you can provide feedback to Apple here.

  • Poor interface with Adobe CS4 and setting the file size for emails

    In frustrations over an unfixed bug in iPhoto (slide shows) in addition to too many limitations, I am trying out Aperture. So far it has been a big disappointment. I like Photoshop (CS4) with layers etc. as well as Adobe Camera Raw, both of which I intend to continue using. The workflow in Aperture appears disappointing (Photoshop) and totally absent (Adobe Camera Raw). It seems like Apple's attempt to capture some of Adobe's market share has has happened on the consumer's expense? Besides disappointing functionality, I have run into a surprising problem: No matter how I set the email photo export preset in preferences, the attachment shows up as a large file when exported to Entourage. The size does not change no matter how I set this preference.
    My 21 years of loyalty and enthusiasm towards Apple has taken some heavy blows lately. With some 15000 photos and 35+ albums in iPhoto, I don't see too many alternatives. Can someone tell me if there is a way around these problems.

    First of all I am not comparing Aperture to Photoshop by expecting the layers function. It is the interface between the two I am questioning. We obviously also have different expectations to Aperture. Mine are solely based on my experiences with iPhoto and what Apple tells me on their website:" Aperture 3 is a professional photography application that lets you refine images, showcase your photography, and manage massive photo libraries. Aperture 3 gives you all the easy-to-use tools you need to import, organize, compare, enhance, and share your photos." I do not find a single sentence stating that it is primarily a "Raw image editor processor" as you are defining it. I was not looking for a new raw editor. I was, however, based on Apple's claims above, expecting a combined advanced editing an photo library application. As such I also expected layers. That is not comparing it to Photoshop. Naturally our views are based on expectations and experiences, and ours are just different, that is all.

  • Help setting up external service for email (MX record)

    I am new to all of this so bear with me....
    I am trying to set up mail using an external service...
    Previously my website and email was hosted by justhost.com... i used muse to develop the website so i recently switched to business catalyst to host and im using domain forwarding to the new site hosted through the business catalyst. (not sure if this plays a role in my issue)
    my email was (as i said) through justhost and i had it set up on my computer with outlook and on my phone. worked fine before...
    when i switched to busines catalyst email went down so now im trying to set it up with the mx record. I have gotten it to work intermittantly but overall no success.
    seems like im missing something simple???
    please help

    Thank You a_chin
    However, my client in frustration for not getting mail on his phone and (I'm sure at this point) thinking that I don't know what the heck I am doing with his website call ipage.com.
    They confirmed to him that the name servers are pointed at worldsecuresystems.com (the Business Catalyst server). My client told me that told him that he had to wait for the MX server to propgate. My client told me that they made no indcation that they did or would make any changes on the ipage.com side of things. Oddly my client started getting emails after about an hour. I check the new muse website I had built and the URL pointed at his old wordpress site. I was confused to say the least. I logged on the the ipage.com admin panel and the name servers where changed back to the ipage defult name servers.

  • How do I make purchased apps, like numbers,keynote,pages,office pro, show up in "open in" function for email attachments?

    How do I make my purchased apps such as, Pages, Numbers, Keynote, Office Pro, available for opening attached documents in email in the"open in" function?

    Thanks for your reply.
    Anyway, here is what I am trying to do:
    It is for a context sensitive display. I am going to sprinkle command links throughout the system and each link will query the database for a specific string and bring out the results in a pop up window.
    I have a backing bean that does the query and a JSF form (that I am trying to pop up) that uses this bean to display the results.

  • Creating a DB_ENV environment/setting a directory path for db's in Windows

    I have a small visual studio 2005 c++ program where I am trying to specify which directory to open my database from. I use db_env_create to create my environment and then I try to use DB_ENV->set_data_dir to set my path but it keeps returning a non 0 number and not setting my path. Did I miss any steps?
    Thanks

    Here is an example that I tried and it is crashing at the set_cachesize.
    I don't set the cachesize it then crashes at the dbenv->open. Any idea why I am crashing? I am using Berkeley version 4.6.21 with Windows xp and visual studio 2005.
    Thanks.
    int ret;
    if ((ret = db_env_create(&dbenv, 0)) != 0)
         cout <<"Error Creating Database " << endl;
         return (1);
    if ((ret = dbenv->set_cachesize(dbenv, 0, 64 * 1024, 0)) != 0)
            cout << "Cache size error " << endl;
         dbenv->close(dbenv, 0);
         return (1);
    (void)dbenv->set_data_dir(dbenv, "C:\Documents and Settings");
    if ((ret = dbenv->open(dbenv, "C:\Documents and Settings\champ\My Documents\Visual  
         Studio 2005\Projects",DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | 
         DB_INIT_MPOOL | DB_INIT_TXN,0)) != 0)
           cout << "Cache size error " << endl;
           dbenv->close(dbenv, 0);
           return (1);
    }

  • HT4863 Why is iCloud's maximum files size for email attachments so small? 20MB?!

    ARGH.

    Small? It's only slightly less than Gmail (25mb) and double Hotmails (10mb).
    Email is not designed for sending files, especially large ones. They have to be encoded which increases the size just to pass through as email.
    Use a proper file sending service, or upload the file somewhere and send a link to it by email.

  • How do I set default start date for email flags

    In IOS 4 and 5 every time i put a flag on an email it used "today's date" as the default date for the flag when the flag synched with Outlook.  Under IOS6, my email flags show up in Outlook with "no date".  Is this an IOS 6 change or did I somehow change the default to "no date" by mistake on my iphone.  This is importatnt becasue Outlook allows you to arrange you inbox by Flag Start Date.  When you arrange it this way, all the flagged emails move to the top by date.  You can then remove all the non-flagged emails as a group.

    Yes. On my new iPhone 5 the iCal week begins on a Monday not a Sunday and does not give me the option to edit in settings on the phone

Maybe you are looking for

  • Cannot install itunes on win 8.1

    I have a Win 8.1 Pro HP ENVY 15t-k000 x64-based Intel Core I7-4710HQ with 16GB Memory, 100 GB SSD and 1TB HDD.  When I originally got the system I downloaded and installed iTunes (don’t  remember which version it was) on it with no problems.  Eventua

  • My horizontal scroll bar went missing when I maximise the window. How do I fix them?

    My horizontal scroll bar went missing when I maximise the window. How do I fix them? I tried everything; such as auto hide the task bar. Even with this, I still can't see the horizontal scroll bar. I even tried the following and I still can't see the

  • Javax.smartcardio package not found in Java source file

    I downloaded the latest JDK from developer.apple.com, but now I cannot find the javax.smartcardio package in the source package (src.jar) that came with it. I unpacked the JAR file, but simply can't find the stated package. Can you help me out?

  • Duplicate Entries in Flashback Table when queried using as of timestamp

    Hi All, Oracle Version : Oracle Server - Enterprise Edition 11.1.0.7 OS: HP-UX PA-RISC (64-bit) We have a table name DIRECTORY_LISTING_GROUP with HEADER_KEY as primary key. So when i query like this SELECT * FROM DIRECTORY_LISTING_GROUP AS OF TIMESTA

  • Information about logon name pre-windows 2000

    Hi, In active directory while creating users we have two fields like logon name and logon name (pre-windows 2000). In windows2008R2 server I created new user (Test user) and 1 new group. I mapped new user to the group. While creating user I have give