Tuesday, February 14, 2012

Connection string

hi. I have trying to load packages from SQL server using "load from SQL comman" and then programmatically changing the connection manager's certain properties(as this property has to be changed in run time.

It works fine when these packages are running from same database but when programmatically I am changing its initial catalogue to some other database, then this is not reflecting even after changing the initial catalogue. Its referring to database which these are created upon. If anyone has some idea please reply back

Is your catalog hardcoded somewhere in the package (like in a table name)?

I would suggest you open your package, try to change the connection string manually and then debug your package step by step.

HTH.

|||

thanks for your reply ,

Well yes the database name is getting added along with the table name.

is ther any way to place just table name or a way to remove the database name ?

Thanks,

|||

Could you give us more details? What component are you referring to? Is it OLE DB Source/Destination?

Most probably it can be fixed; just tell us what component has the catalog name hard-coded.

Thanks.

|||

Anshu nautiyal wrote:

thanks for your reply ,

Well yes the database name is getting added along with the table name.

is ther any way to place just table name or a way to remove the database name ?

Thanks,

That is your problem; make sure all sql statements in the package do not have the dabase name as they may be diffrent when you change the connection strings. Just edit the sql statements and remove the database part of the name.

|||

Anshu nautiyal wrote:

thanks for your reply ,

Well yes the database name is getting added along with the table name.

is ther any way to place just table name or a way to remove the database name ?

Thanks,

That is your problem; make sure all sql statements in the package do not have the dabase name as they may be diffrent when you change the connection strings. Just edit the sql statements and remove the database part of the name.

No comments:

Post a Comment