Showing posts with label newb. Show all posts
Showing posts with label newb. Show all posts

Monday, March 26, 2012

FTP & File System Task

I'm just learning 2005, so apologies in advance for the newb questions.

I am facing the following situation: Each day I have to upload an assortment of .csv files with variable names (eg. FileOneYYYYMMDD.csv, FileTwoYYYYMMDD.csv, etc.) to an FTP site, from the following directory structure:

Directory1

SubDirectoryA

SubDirectoryB

SubDirectoryC

I have accomplished this by setting up a package with three sequence containers (one for each subdirectory), each of which holds a Foreach loop (with a file enumerator configured as *.csv), each of which holds an FTP Task. This may not be the best way to do it, but it works. But if there's a better way I'd like to know!

Anyway, the wall I've run into is trying to move the .csv files to an archive directory after they've been uploaded. The wildcard variable doesn't seem to work with the File System Task, so I'm having a hard time figuring out how to move a bunch of variably named .csv files at different depths of a directory structure to an archive directory.

I've searched but can't seem to find a solution.

Why not add a file system task after the FTP task (hook them up together with a precedence constraint) to move the file after the FTP task completes?|||

Nah, that sounds too easy. Big Smile

On a more serious note, it seems I had to also set DelayValidation = True on the File System Task.

|||

I have a similar process.

I'm grabbing csv's that contain a date in the name from an ftp site and dropping them locally in the "Processing" folder. Once the file processes completely I move the file to the "Processed" folder. If it errors then I move it to the "Error" folder and have appended to the name of the file the date & time it errored.

In addition, before I kick off this whole process I use a script component to check if a file exists either in the "Processed" or "Processing" folder before bothering to ftp it.

As far as the errored files go, since I make the name unique with the timestamp i can attempt the uploads infinite number of times.

Also, I'm using a For Look container with Package level variables so I can access the variables at any time throughout the process.

Monday, March 19, 2012

From local to Inet server

Hi..

First of all im a super newb in asp.net and MSSQL.
I had a guy program a website with database, but the guy just stood me up and left me with the files and the server as a file.

Now I need to get them online and working.

The files are FTP on the server so I "just" need the server running

I got the following files:

Justgeek_data.mdf and Justgeek_log.ldf

The server admin interface is:myLittleAdmin.

Any walktrough help or simular would be highly appreciated.

The web is:http://www.bodyplanning.dk

have alook at SQL Server "attach database" process on MSDN

http://msdn2.microsoft.com/en-us/library/ms190794.aspx

|||

Got the database up and running but still errors:

Main page:http://www.bodyplanning.dk/default.aspx

Sub pages:

http://www.bodyplanning.dk/frmLogin.aspx

|||

It is likley that there is a user set up in the database, which also needs to exist at the global level in SQL Server.

Look in Security/Logins in SQL server, then add any users in the database you have attached, and set the passwords.

In the web.config file for the site, ensure that the usernames and passwords match up