Showing posts with label objects. Show all posts
Showing posts with label objects. Show all posts

Monday, March 19, 2012

"The package contains two objects with the duplicate name" - Package Created in UI - D

I've begun to get the above error from my package. The error message refers to two output columns.

    Anyone know how this could happen from within the Visual Studio 2005 UI? I've seen the other posts on this subject, and they all seemed to be creating the packages in code.

    Is there any way to see all of the columns in the data flow? Or is there any other way to find out which columns it's referring to?

Thanks!

I just can think about an ugly way; switch to the XML view (right click on the package name in the explorer) and do a 'find' within the code...

Perhaps you created some outpust by hand using the advanced editor of some components

|||

Well, next time it will be the XML editor. The problem went away "by itself".

"Serializing" to the SqlServer Database

Hi.

I was wondering, if there is an easy way to insert and retrieve objects from SqlServer database? Basically this is what i want to do:

- I define a class, which has several dozen members.
- I want to insert many of these objects to the database.
- All classes members should have its own column in the database table.

Do I have to manually constuct a database tables and sql inserts, so I could save the objects to the database? Or is there a way to tell the .NET to construct me a the sufficient database tables and sql statements? Can DataSets used somehow to achieve this result?

I'm not sure what version of the .NET framework you are using. If you are using 1.1, you might want to take a look at the Microsoft Enterprise Library:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/entlib.asp

Specifically look at the Configuration Application Block which allows you to serialize objects that can be stored in XML, the registry, SqlServer, or in a custom location if you wish to implement your own custom storage provider.

In the case of Sql Server, defined stored procedures are called to store and retrieve the data from Sql server. The object is serialized when it is stored and deserialized when it is retrieved. The sample code includes scripts that can be used to create the underlying tables and stored procedures.

There is a January 2006 release of the 2.0 Enterprise Library that I'm not as familiar with as I am with the 1.1 version.

|||I am using the .NET Framework 2.0.

But since the Enterprise Library contains this kind of functionality, it'll be good assumption that the CompactFramework itself doesen't contain one?

I thought that .NET has the functionality, because in a Microsoft event, where a MS-Evangelist demostrated some new features of .NET 2.0, this kind of DB-based settings handling cought my eye at some point (sorry Aali, I was a little sleepy;)), I think it had something to do with the browser based ASP.NET website management console. I don't remember the details though...

But it could be the case, that the services of the very same Enterprice Platform have been used with the management console.

Thanks for You reply! (You folks can of course give me more info if you please;))
|||

You can do all the things with .NET (1.1 or 2.0) that the Enterprise Library is doing. The advantage of using the Enterprise Library is that Microsoft has already done the work for you (as well as the testing) and wrapped it up in a nice framework.

Here is an outline of the steps you'd need to take

To save an object:
1. Make sure your class has the [Serializable] attribute applied. Your class must support (either implicitly or explicitly) a no parameter constructor.
2. Popluate an object made from the class with data
3. Call the Serialize() method of an XmlSerializer object (for example). You pass in to this method your object and the stream that the serialized output will be sent to.
4. Construct the proper SQL statements to insert the stream data into a custom database table. The data type of the SQL column the stream data is saved to must be able to accept the character range of the stream as well as it's length. NText would be a good choice.

To retrieve an object:
1. Construct the proper SQL statements to populate a Stream with the data that was stored in #4 above.
2. Call the Deserialize() method on the same type of formatter used in #3 above passing in the Stream object. The method returns an object that must be cast to the class defined in #1 above.

Hope this helps.

Saturday, February 25, 2012

"Cannot apply value null to property Login: Value cannot be null..".

I'm trying to use a transfer "SQL Server Objects Task" between a 2005 SQL Server Database and a 2000 SQL Sever Database. I have the login info specified in the connection I'm using.
According to the Debug Output the process truncates the destination tables but then stops with the: "Cannot apply value null to property Login: Value cannot be null..".
Any help anybody?
NFThis probably means that you need to specify a login to use in the transfer.

Could you repost this in the SSIS forum? (http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=80&SiteID=1)|||

I had the same problem and I was specifying the sa login for my connection. When I tested the connection everything worked fine. But I received the same error message when I attempted to execute the package. I changed it to Windows Authentication and it worked fine. Unfortunately, I have to be able to specify a SQL login when I roll this into production.

I have tried all of the PackageProtectionLevels, but none seem to work. Any help would be greatly appreciated.

|||

I had the same problem. I installed SQL 2005 SP1 and it worked for me with SQL authentication.

|||

Unfortunately I’m using SSIS between a SQL 2000 (local) & SQL 2005 (remote). If I install SQL 2005 SP1 on my machine will that cure this problem – meaning, will the SSIS tools work properly?

-Cheers

|||Try changing your compatability level of the database to 2005

"Cannot apply value null to property Login: Value cannot be null..".

I'm trying to use a transfer "SQL Server Objects Task" between a 2005 SQL Server Database and a 2000 SQL Sever Database. I have the login info specified in the connection I'm using.
According to the Debug Output the process truncates the destination tables but then stops with the: "Cannot apply value null to property Login: Value cannot be null..".
Any help anybody?
NFThis probably means that you need to specify a login to use in the transfer.

Could you repost this in the SSIS forum? (http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=80&SiteID=1)|||

I had the same problem and I was specifying the sa login for my connection. When I tested the connection everything worked fine. But I received the same error message when I attempted to execute the package. I changed it to Windows Authentication and it worked fine. Unfortunately, I have to be able to specify a SQL login when I roll this into production.

I have tried all of the PackageProtectionLevels, but none seem to work. Any help would be greatly appreciated.

|||

I had the same problem. I installed SQL 2005 SP1 and it worked for me with SQL authentication.

|||

Unfortunately I’m using SSIS between a SQL 2000 (local) & SQL 2005 (remote). If I install SQL 2005 SP1 on my machine will that cure this problem – meaning, will the SSIS tools work properly?

-Cheers

|||Try changing your compatability level of the database to 2005

Friday, February 24, 2012

"Cannot apply value null to property Login: Value cannot be null..".

I'm trying to use a transfer "SQL Server Objects Task" between a 2005 SQL Server Database and a 2000 SQL Sever Database. I have the login info specified in the connection I'm using.
According to the Debug Output the process truncates the destination tables but then stops with the: "Cannot apply value null to property Login: Value cannot be null..".
Any help anybody?
NFThis probably means that you need to specify a login to use in the transfer.

Could you repost this in the SSIS forum? (http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=80&SiteID=1)|||

I had the same problem and I was specifying the sa login for my connection. When I tested the connection everything worked fine. But I received the same error message when I attempted to execute the package. I changed it to Windows Authentication and it worked fine. Unfortunately, I have to be able to specify a SQL login when I roll this into production.

I have tried all of the PackageProtectionLevels, but none seem to work. Any help would be greatly appreciated.

|||

I had the same problem. I installed SQL 2005 SP1 and it worked for me with SQL authentication.

|||

Unfortunately I’m using SSIS between a SQL 2000 (local) & SQL 2005 (remote). If I install SQL 2005 SP1 on my machine will that cure this problem – meaning, will the SSIS tools work properly?

-Cheers

|||Try changing your compatability level of the database to 2005

"Cannot apply value null to property Login: Value cannot be null..".

I'm trying to use a transfer "SQL Server Objects Task" between a 2005 SQL Server Database and a 2000 SQL Sever Database. I have the login info specified in the connection I'm using.
According to the Debug Output the process truncates the destination tables but then stops with the: "Cannot apply value null to property Login: Value cannot be null..".
Any help anybody?
NF
This probably means that you need to specify a login to use in the transfer.

Could you repost this in the SSIS forum? (http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=80&SiteID=1)|||

I had the same problem and I was specifying the sa login for my connection. When I tested the connection everything worked fine. But I received the same error message when I attempted to execute the package. I changed it to Windows Authentication and it worked fine. Unfortunately, I have to be able to specify a SQL login when I roll this into production.

I have tried all of the PackageProtectionLevels, but none seem to work. Any help would be greatly appreciated.

|||

I had the same problem. I installed SQL 2005 SP1 and it worked for me with SQL authentication.

|||

Unfortunately I’m using SSIS between a SQL 2000 (local) & SQL 2005 (remote). If I install SQL 2005 SP1 on my machine will that cure this problem – meaning, will the SSIS tools work properly?

-Cheers

|||Try changing your compatability level of the database to 2005