Results 1 to 10 of 10

Thread: Saving a picture without manually choosing the location?

Threaded View

  1. #8
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Saving a picture without manually choosing the location?

    btw - there is a set of methods available that will combine paths and filenames - part of the System.IO namespace

    they work like this:

    Code:
    Dim strReportFolder As String = System.Web.Configuration.WebConfigurationManager.AppSettings("reportfolder")
    Dim strStagingFolder As String = Path.Combine(strReportFolder, "staging")
    Dim strBusyFile As String = Path.Combine(strStagingFolder, "Busy.txt")
    That first Dim gets the path from a web.config file - you could just as easily hardwire that but if you are going to run this app elsewhere you need a way to make that more "variable"

    Code:
      <appSettings>
        <add key="reportfolder" value="D:\ACS Desktop\AWC\reporting"/>
    Attached Images Attached Images  

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width