.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Import file names from a folder

Posted By:      Posted Date: October 06, 2010    Points: 0   Category :ASP.Net

First of all, I only know VB (I know that isn't great but it's all I got).

Second, I have a folder with 200+ pictures.  I want to get the names of each of the pictures to the database. 

Last, would it be easier to import and export the images into the database (I want my webpage to be able to show the images once they are in the database)?



View Complete Post

More Related Resource Links

Import List of Worksheet Names from Multiple Sheets Excel File

I am only interested in OPENROWSET/OPENQUERY or xp_cmdshell solutions. Thanks.
Kalman Toth, SQL Server & Business Intelligence Training; SQL 2008 GRAND SLAM

Import XML File to SQL Table

Here is a brief example of importing an XML file into SQL Server table. This is accomplished by using the BULK option of OPENROWSET to load the file, and then utilizing the XQuery capabilities of SQL Server to parse the XML to normalized table format. This example requires SQL server 2005 or SQL Server 2008.

First, the following XML is saved to XML file C:\Products.xml.

Programmatically delete a .webpart file from wpcatalogs folder from an IIS website


We are using a third party wsp in our solution which directly adds the web parts into the web application store rather than the web part gallery(References to them are present in IIS site's wpcatalog directory). We want to remove these web part files so that the users will not be able to add these web parts to pages directly. Or any other modification so that users will not be able to add these directly. Is there a way we can do this programmatically?

Method/Way to know whether a input path of FilesSystem contains any Child file/folder or not

Hi,I am looking for a Method/Way to know whether a input path of FilesSystem contains any Child file/folder or not. To know it currently I am using "Directory.GetFileSystemEntries(Path).Count" and checking if count > 0 then returning True else False. For this first method calculates all the files and folder and then return status to me but I want to exit out as soon as my method gets first element(file/folder) in specified path. Because above method is timing out when my input path contains more than 1 million files. I just need to check whether input folder path contains any child file/folder or not. I have tried to use Win32 API also but on ther server it is crashing so I donot want to use that solution. In .NET any method or way is present to know it. Please suggest me.

Web Folder problem : This file cannot be saved to this location because there is no connection to th

When I check out a Word 2007 document from a list, I cannot save it back to the server.  I get:   This file cannot be saved to this location because there is no connection to the server.  Check your network connection and try again.   I am using a Virtual Machine (Virtual PC).  I have the Microsoft Loopback adapter installed.    The server has a static IP address and is a domain controller. I am able to access the web folder through Windows Explorer.   How do I set up Office, Sharepoint and Webdav so that I can check files out of sharepoint and save them back, on a virtual machine?

using application configuration file in AppData special folder

Hi! So I understand it is a best practice to save the application configuration files under the AppData folder, rather than in Program Files, since UAC will restrict write acces to the Program Files folder, which is fine. Now, saving the configuration file to another location is no problem, using the SaveAs method. However, when I load the application, I expect some settings to be read. From what I know, this is done either using direct calls to the ConfigurationManager class, either initializing a Configuration object. For the first case, a example is this: if (ConfigurationManager.AppSettings["Title"] != null) { this.Title = ConfigurationManager.AppSettings["Title"]; titleTextBox.Text = ConfigurationManager.AppSettings["Title"]; } For the second case, I would use it like this: Configuration config = ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.None); string setting = config.AppSettings.Settings["Title"].Value.ToString(); So, if the application runs in the Program Files folder, an exception is thrown when I save the file. However, if I save the file using SaveAs and save it to AppData folder, obviously, when loading, the settings are not loaded from the AppData folder, but from the configuration file existing in the Program Files folder. One way to solve

How to import XML file with BCP?

I am a first time BCP user.  I have an XML file that I need to import into a new table in SQL Server.  This is using SQL Server 2008 and BCP version 10.50.16.  I read through the documentation but I get 370,000 errors!  (This is a very large file).  When I open the error log, I just see a bunch of question marks.  About this XML file: it does use a new line to delineate rows, however, it uses the space character to separate fields.  So I'm not sure if that is what causes it to fail.  The failure message is: BCP copy in failed I wish it were more descriptive.  Is there a way to get a more detailed error message? Otherwise, here is my command: d:\SQL Tables\data>bcp Development.dbo.wbl_zSkywardEnrollment2 in zSkywardEnroll ment.xml -fSE_format.fmt -m50 -eseErrorLog -b100 -t0x20 -T -F107 All of these files are in this same directory.  I know it says to specify full file path, but since they're all in this same directory and also I saw another example where they didn't specify directories I thought this would suffice. I have tried this without the format file also, doing it interactively but get same errors. And I have tried this starting with row 1.  I am curious which line should BCP start on?  Line 1 of this XML starts with Schema and ElementType info.  But on line 107 is where rs:data section

Can't import VWI file from SharePoint Designer into Visio

Hi,   I have Visio 2010 Premium.  Am running SharePoint 2010 Enterprise. I have created a workflow in SharePoint Designer 2010.  I select the "Export to Visio" button.  A VWI file is created. In Visio 2010, I attempt to open the file.  However, Visio reports that it cannot read the file.   Please advise.

Saving Image File in a Folder on Sever from Client Machine using Sql Server

  Hi EveryOne... Can anyone help me Saving an Image file in a Server folder from a client machine using Sql server 2005....   

CSV file import

I want to import file ( CSV ). Can any one tell me how to write a stored procedure for this purpose or any other way to import a CSV file into my database.

specified file or folder name is too long

Hi, We have MOSS 2007 SP1 databases on SQL Server 2005 SP3. All are 64 bit. We are intermittingly seeing the below  message in ULS log.: 09/01/2010 07:07:16.34 w3wp.exe (0x14BC)                       0x0D14 Windows SharePoint Services   General                                       8kh7      High       The specified file or folder name is too long. The URL path for all files and folders must be 260 characters or less (and no more than 128 characters for any single file or folder name in the URL). Please type a shorter file or folder name   But I'm unable to find the root cause that is causing this issue. I want to find which particular document or process or url is  cauisng this error? Where can I get that info? Whenever we see the above message in ULS logs, we are also experiencing blocking in SQL Server and users are facing very slow performance. Please advice Thanks

How to import MOD video file to windows movie maker (WMM)?

MOD to windows movie maker converter is one of the most efficient converting program for your to convert MOD file to windows movie maker compatible format—WMV, AVI, MPG so that you could import MOD to windows movie maker for editing MOD with WMM without difficulty. People may encounter many problems about MOD and windows movie maker •1. I have an Everio JVC hard disk drive (meaning no tape needed) and the Windows movie maker says it doesn't support "The file F:\SD_VIDEO\PRG003\MOV0CD MOD is not a supported file type, and it cannot be imported into Windows Movie Make". •2. Hey I just got this video Camera with a hard driver build in, and it makes all the movie files in MOD files, but how do I convert them so I can put them into Windows Movie maker? •3. I have MOD video files on an sd card that I am trying to open and edit with windows movie maker. It shows the video but there is no sound from the files. Please help. The main reason for movie maker not being able to recognize MOD A MOD video file is used by some models of Panasonic, JVC, Canon and perhaps other camcorders and windows movie maker does not support MOD. That is why you are having problems. Windows movie maker is quite friendly to WMV, AVI and MPG format. MOD to windows movie maker converter is the best software to change MOD files extension for importing MOD to windows movie maker Ap

Where is the document library setting "Unique file names"?

Live can be so simple if only… ;-).   When using DMS functionality unique file names must be possible. The name is an unimportant attribute when using Meta data. So why can I not choose somewhere in the document library settings something like:   ·         Generate unique filenames Or ·         Do not allow overwrite existing filenames   Maybe in the first service pack?   MS? Please, please, please  

SSIS FOR each loop to load 1 file after other into database for particaular folder

HI I am using ssis 2008,i have folder in which i have 10 excel file.i wont to load them one after other in data  base I have created a Dataflow task that load one file into database.i have inserted this dataflow task into For each loop and in For each loop i have give that folder path and *.XLSX  and in variable mapping i have created one variable  which i have passed in Database destination connecion string (properties->expression) but still i get error "cannot acquire connection from connection manager" please guide me or provide me with some reference so that i cud load file from folder into database one after other

Import Error: Could not process the file Documents/Application Deployment.mht as a Single File Web P

Hi there everyone, Version: Windows Sharepoint Services 3.0 with Cumulative Update June 29, 2010 applied. I am having issues importing an exported site into a different domain. I've overcome most of the issues and actually got most of the site to import, however, the import process get's stuck on import a Single File Web Page document from a document library. I believe the original cause of this error is http://support.microsoft.com/kb/980079 The issue I face now is, I already have a large number of .mht files in my document library which I do need to import into the test environment (or that I might need to restore in a DR scenario). Does anyone have any information on either: forcing the import commmand to "on error resume next" (ie. not stop processing when it encounters an error) fixing the already corrupt .mht files in the database easily The error text from the import command is: Error: Could not process the file Documents/Application Deployment.mht as a Single File Web Page document. at Microsoft.SharePoint.Library.SPRequest.CreateOrUpdateFileAndItem(String bstrUrl, String bstrWebRelativeUrl, Guid& docId, Object varDoc, Int32 docLength, Int32 exists, String bstrCreatedBy, String bstrModifiedBy, Int32 iCreatedByID, Int32 iModifiedByID, Int32 iVersion, Object varTimeCreated, Object varTimeLastModified, Object varProperties, String checkInComment, Int3

Deleting the file from sharepoint folder gives error

Hi All, I am trying to delete a file from sharepoint it show error like this: <Result ID=\"1,Delete\" xmlns=\"http://schemas.microsoft.com/sharepoint/soap/\"><ErrorCode>0x80070005</ErrorCode><ErrorText>The operation failed because an unexpected error occurred. (Result Code: 0x80070005)</ErrorText>
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend