Showing posts with label populated. Show all posts
Showing posts with label populated. Show all posts

Tuesday, March 20, 2012

connectionstring gets populated unwillingly

Hi,
I hav eplaced an expression for the flat file connection as below

@.[User::FileDirectory] + @.[User::FileName]

This is supposed to be used instead of the ConnectionString property of the flat file connection.

You can see that I have created two variables.

The variable
@.[User::FileDirectory] is set to the directory. i.e. I have hardcoded the path to it and assigned it to this variable.

The variable @.[User::FileName] is picked up automatically.

The question is:

When I go to the properties of the flat file connection, I delete the value inside the connectionstring property becuase there is now the expression which is set to the connectionstring.
But when I come back to this property then I am not sure why the connectionstring property gets populated with the directory that I hardcoded to the variable.

Many thanks

arkiboys wrote:

Hi,
I hav eplaced an expression for the flat file connection as below

@.[User::FileDirectory] + @.[User::FileName]

This is supposed to be used instead of the ConnectionString property of the flat file connection.

You can see that I have created two variables.

The variable
@.[User::FileDirectory] is set to the directory. i.e. I have hardcoded the path to it and assigned it to this variable.

The variable @.[User::FileName] is picked up automatically.

The question is:

When I go to the properties of the flat file connection, I delete the value inside the connectionstring property becuase there is now the expression which is set to the connectionstring.
But when I come back to this property then I am not sure why the connectionstring property gets populated with the directory that I hardcoded to the variable.

Many thanks

This is by design. The connectionstring property is picking up the value from the expression. Don't worry about it. It will be correct at runtime.|||

I'm not sure if this is correct because in the connectionstring property it shows:

\\gblond088s0b\D$\ApplData\CEM\WorkingTemp\

and in the expressions it shows:

@.[User::FileDirectory] + @.[User::FileName]

Please note that in the variable design I have manually assigned the variable @.[User::FileDirectory] to the path above

Thanks

|||

I forgot to mention that it gives the following error:

Error: 2007-07-26 18:10:05.39
Code: 0xC020200E
Source: Data Flow Task Flat File Source [1]
Description: Cannot open the datafile "\\gblond088s0b\D$\ApplData\CEM\WorkingTemp\".
End Error

so basically, it is not seeing the filename. it only sees the directoryname

Thanks

|||

arkiboys wrote:

I forgot to mention that it gives the following error:

Error: 2007-07-26 18:10:05.39
Code: 0xC020200E
Source: Data Flow Task Flat File Source [1]
Description: Cannot open the datafile "\\gblond088s0b\D$\ApplData\CEM\WorkingTemp\".
End Error

so basically, it is not seeing the filename. it only sees the directoryname

Thanks

Right. You need to give the Filename variable a default value. And if, during runtime, it still cannot find the data file, then you aren't populating the Filename variable correctly.|||

This is strange.
If I use a loop and give it the full directory path as described before, the foreach loop picks up the filenames and runs the package successfully. But I do not want to use a loop.

The package gets called once per filename. So the filename gets passed to the package and I want it to run but obviously it does not.

Not sure why the filename does not get populated when it is being passed to the package.

Thanks

|||How are you populating the Filename variable otherwise?|||

I have created a variable called @.FileName.

There is also a flat file connection which has a path to the directory as described before.

There is a command prompt which someone else is in charge of running, at the end of this command it passes the filename.

How do you think the filename should get populated?

note that I do not have this problem when I use a foreach loop but for this project loop is not required.

Thanks

|||

arkiboys wrote:

I have created a variable called @.FileName.

There is also a flat file connection which has a path to the directory as described before.

There is a command prompt which someone else is in charge of running, at the end of this command it passes the filename.

How do you think the filename should get populated?

note that I do not have this problem when I use a foreach loop but for this project loop is not required.

Thanks

I'm asking HOW you are passing a value to the Filename variable. HOW is the command line, that someone else is in charge of executing, populating the Filename variable? You need to know this before asking your questions here.|||

Ok,
If I want to run the package myself, how can I do this using the command line?

|||DTEXEC /FILE "Path to your package" /SET "\Package.Variables[Namespace::VariableName].Properties[Value]";YourValue

Friday, February 24, 2012

Connection String Problem

I am working on a new website where the ISP (GoDaddy) has plans that include
a sql server (one db). I setup the db, built and partially populated some
tables and, from an aspx page on that account, I figured out the connection
string - works pretty well (I sure miss EM!). Now, I want to create a
windows application (desktop) to manage some aspects of that database but
the server name that works from the aspx page does not work from a windows
application. The sql server "address" is something like"
xxsql01.prod.xxxx1.secureserver.net
(Not sure if that is a name limited to the account so I "x" out parts of
it?) and there is a DB name which I use as the Initial Catalog.
Has anyone dealt with this type of server before? Any hints on how to
address it externally? I tried prefixing that address with the domain name
of the ISP account but that did not help
Appreciate any suggestions.
WayneUsing Enterprise Manager, I can register SQL Server hosted at my ISP via IP
address. Just try specifying the IP for the server name.
"Wayne Wengert" <wayneDONTWANTSPAM@.wengert.com> wrote in message
news:eW6auhuDFHA.2220@.TK2MSFTNGP09.phx.gbl...
> I am working on a new website where the ISP (GoDaddy) has plans that
include
> a sql server (one db). I setup the db, built and partially populated some
> tables and, from an aspx page on that account, I figured out the
connection
> string - works pretty well (I sure miss EM!). Now, I want to create a
> windows application (desktop) to manage some aspects of that database but
> the server name that works from the aspx page does not work from a windows
> application. The sql server "address" is something like"
> xxsql01.prod.xxxx1.secureserver.net
> (Not sure if that is a name limited to the account so I "x" out parts of
> it?) and there is a DB name which I use as the Initial Catalog.
>
> Has anyone dealt with this type of server before? Any hints on how to
> address it externally? I tried prefixing that address with the domain name
> of the ISP account but that did not help
>
> Appreciate any suggestions.
>
> Wayne
>|||Ask your provider if the SQL-Server is directly accessible from the internet
and not blocked by a firewall. Many (most ?) ISP are now blocking the port
1433 to *protect* the sql-servers from outside attacks.
Even if the SQL-Server is accessible from the outside (Internet), if there
is a proxy then the connection string might be different then the one used
for ASP.NET.
S. L.
"Wayne Wengert" <wayneDONTWANTSPAM@.wengert.com> wrote in message
news:eW6auhuDFHA.2220@.TK2MSFTNGP09.phx.gbl...
>I am working on a new website where the ISP (GoDaddy) has plans that
>include
> a sql server (one db). I setup the db, built and partially populated some
> tables and, from an aspx page on that account, I figured out the
> connection
> string - works pretty well (I sure miss EM!). Now, I want to create a
> windows application (desktop) to manage some aspects of that database but
> the server name that works from the aspx page does not work from a windows
> application. The sql server "address" is something like"
> xxsql01.prod.xxxx1.secureserver.net
> (Not sure if that is a name limited to the account so I "x" out parts of
> it?) and there is a DB name which I use as the Initial Catalog.
>
> Has anyone dealt with this type of server before? Any hints on how to
> address it externally? I tried prefixing that address with the domain name
> of the ISP account but that did not help
>
> Appreciate any suggestions.
>
> Wayne
>|||Thanks guys. I'll pursue those suggestions.
Wayne
"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:OqUzD9uDFHA.148@.TK2MSFTNGP14.phx.gbl...
> Ask your provider if the SQL-Server is directly accessible from the
internet
> and not blocked by a firewall. Many (most ?) ISP are now blocking the
port
> 1433 to *protect* the sql-servers from outside attacks.
> Even if the SQL-Server is accessible from the outside (Internet), if there
> is a proxy then the connection string might be different then the one used
> for ASP.NET.
> S. L.
> "Wayne Wengert" <wayneDONTWANTSPAM@.wengert.com> wrote in message
> news:eW6auhuDFHA.2220@.TK2MSFTNGP09.phx.gbl...
some
but
windows
name
>