Showing posts with label format. Show all posts
Showing posts with label format. Show all posts

Tuesday, March 27, 2012

FTP Task

I am trying to grab a file from an ftp server hosted on a mainframe. The path to the file is in the following format 'xxx.xxxx.xxxxx' Yes you read right there are single quotes surrounding a string. If I use the built in ftp program in command prompt I am able to download the file after executing the following commands.

ftp ftpserver.domain.com
userid
password
cd 'xxx.xxxxxx.xxxxxx'
get remotefile localfile

The problem is when I use an ftp task in a ssis package. When I define the remote path I get an error that says the path doesn't start with a /. Of course the path doesn't start with a / it starts with '. Just for giggles I added / infront of the ' and got an error that said the file doesn't exist.It is a known problem when using non-Microsoft FTP servers. You can search this forum for many conversations on that topic.

One workaround is to build your own batch file and then execute that batch file with an Execute Process task inside SSIS.|||

Phil Brammer wrote:

It is a known problem when using non-Microsoft FTP servers. You can search this forum for many conversations on that topic.

One workaround is to build your own batch file and then execute that batch file with an Execute Process task inside SSIS.

That's what I thought I would need to do. Just wanted to make sure the out of the box solution was really broke before I went down that path. Thanks!

|||

If you think that not being able to receive files from the stock FTP task on a mainframe is a serious bug and would like to see it fixed, please "vote" on the following:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=281893

sql

FTP Task

I am trying to grab a file from an ftp server hosted on a mainframe. The path to the file is in the following format 'xxx.xxxx.xxxxx' Yes you read right there are single quotes surrounding a string. If I use the built in ftp program in command prompt I am able to download the file after executing the following commands.

ftp ftpserver.domain.com
userid
password
cd 'xxx.xxxxxx.xxxxxx'
get remotefile localfile

The problem is when I use an ftp task in a ssis package. When I define the remote path I get an error that says the path doesn't start with a /. Of course the path doesn't start with a / it starts with '. Just for giggles I added / infront of the ' and got an error that said the file doesn't exist.It is a known problem when using non-Microsoft FTP servers. You can search this forum for many conversations on that topic.

One workaround is to build your own batch file and then execute that batch file with an Execute Process task inside SSIS.|||

Phil Brammer wrote:

It is a known problem when using non-Microsoft FTP servers. You can search this forum for many conversations on that topic.

One workaround is to build your own batch file and then execute that batch file with an Execute Process task inside SSIS.

That's what I thought I would need to do. Just wanted to make sure the out of the box solution was really broke before I went down that path. Thanks!

|||

If you think that not being able to receive files from the stock FTP task on a mainframe is a serious bug and would like to see it fixed, please "vote" on the following:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=281893

Friday, March 23, 2012

frustrating formats

there are times i realize why people are resistant to .net...
in vb6, i can use: format$(fields!phonenumber,"(###) ###-####")
in vbnet:
1 - problem: no support for string formatting, only numbers
compensate: use csng
result: format(csng(fields!phonenumber),"(###) ###-####")
2 - new problem: empty strings result in an error
compensate: use iif function
result: iif ( len(trim(fields!phonenumber))=0,"",
format(csng(fields!phonenumber),"(###) ###-####"))
3 - new problem: vbnet evaluates ALL THREE EXPRESSIONS, regardless of the
condition. so empty strings still result in an error.
this is inexplicable.
iif(<condition>,<truepart>,<falsepart>) replaces:
if <condition> then
<truepart>
else
<falsepart>
end if
why are all 3 being evaluated?
so, half an hour later, i have no solution.
simple need: i want to display a phone number properly formatted if one
exists, and nothing if it doesn't.
please help!
dushan bilbijaTry an expression like this.
=iif(Fields!phonenumber.Value = Nothing, "",
format(csng(fields!phonenumber.Value),"(###) ###-####"))
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dushan Bilbija" <dbilbija@.msn.com> wrote in message
news:uBwTRH0iEHA.2664@.TK2MSFTNGP11.phx.gbl...
> there are times i realize why people are resistant to .net...
> in vb6, i can use: format$(fields!phonenumber,"(###) ###-####")
> in vbnet:
> 1 - problem: no support for string formatting, only numbers
> compensate: use csng
> result: format(csng(fields!phonenumber),"(###) ###-####")
> 2 - new problem: empty strings result in an error
> compensate: use iif function
> result: iif ( len(trim(fields!phonenumber))=0,"",
> format(csng(fields!phonenumber),"(###) ###-####"))
> 3 - new problem: vbnet evaluates ALL THREE EXPRESSIONS, regardless of the
> condition. so empty strings still result in an error.
> this is inexplicable.
> iif(<condition>,<truepart>,<falsepart>) replaces:
> if <condition> then
> <truepart>
> else
> <falsepart>
> end if
> why are all 3 being evaluated?
> so, half an hour later, i have no solution.
> simple need: i want to display a phone number properly formatted if one
> exists, and nothing if it doesn't.
> please help!
> dushan bilbija
>

Friday, February 24, 2012

free distribution of "Database Engine"

Hi:

I'm an asp.net programmer and my database is in access format.
My server is Windows Server 2003 Enterprise Edition Service Pack 1.
I do not need microsoft access installed on my server to access my database through asp.net.


I want migrate my database to sql server 2005

Could I access my database in sql server 2005 format (mdf) through asp.net without sql server 2005 installed on the server?

could I buy to microsoft only "Database Engine"? or
Is there a free distribution of "Database Engine"?

Thanks!!

There is a free version of SQL Server 2005, SQL Server Express..

http://msdn.microsoft.com/vstudio/express/sql/

The data does need to be on some machine somewhere with SQL Server installed.

|||

Hi,

You do not need Access installed on the server, only the runtime (which I think ships with Windows these days, at the very worst the runtime is freely distributable if you have VSTO). You should take a look at SQL Server 2005 Express edition (http://msdn.microsoft.com/vstudio/express/sql/download/). Free, and as easy (or easier) to use as Access.

Hope this helps.