<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RE: Unexpected error can't convert system.object to a blue prism data type in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/55245#M9620</link>
    <description>&lt;DIV&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;You will probably need to handle the output data type, see this article: &lt;A href="https://community.blueprism.com/communities/community-home/digestviewer/viewthread?GroupId=145&amp;amp;MID=4443&amp;amp;CommunityKey=3743dbaa-6766-4a4d-b7ed-9a98b6b1dd01&amp;amp;tab" target="test_blank"&gt;https://community.blueprism.com/communities/community-home/digestviewer/viewthread?GroupId=145&amp;amp;MID=4443&amp;amp;CommunityKey=3743dbaa-6766-4a4d-b7ed-9a98b6b1dd01&amp;amp;tab&lt;/A&gt; =digestviewer&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;The solution is very similar.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Leonardo Soares&lt;BR /&gt;RPA Developer Tech Leader&lt;BR /&gt;Bridge Consulting&lt;BR /&gt;América/Brazil&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Sat, 06 Jan 2024 21:34:00 GMT</pubDate>
    <dc:creator>LeonardoSQueiroz</dc:creator>
    <dc:date>2024-01-06T21:34:00Z</dc:date>
    <item>
      <title>Unexpected error can't convert system.object to a blue prism data type</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/55243#M9618</link>
      <description>&lt;P&gt;I intended to do the following&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Connect to Blue prism data base from process studio&lt;/LI&gt;
&lt;LI&gt;Execute certain query&lt;/LI&gt;
&lt;LI&gt;Retrieve the output as collection able to connect successfully to database but facing below error at 'get collection ' stage-- Internal: Unexpected error can't convert system.object to a blue prism data type.&lt;/LI&gt;
&lt;/OL&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Giri Gurijala&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Dec 2023 07:56:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/55243#M9618</guid>
      <dc:creator>GiriGurijala</dc:creator>
      <dc:date>2023-12-28T07:56:00Z</dc:date>
    </item>
    <item>
      <title>RE: Unexpected error can't convert system.object to a blue prism data type</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/55244#M9619</link>
      <description>&lt;P&gt;[Mod Note: Moved to Blue Prism RPA forum]&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":blue_heart:"&gt;💙&lt;/span&gt; Michael &lt;BR /&gt;(I'm part of the SS&amp;amp;C Blue Prism Community Team)&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Dec 2023 08:46:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/55244#M9619</guid>
      <dc:creator>Michael_S</dc:creator>
      <dc:date>2023-12-28T08:46:00Z</dc:date>
    </item>
    <item>
      <title>RE: Unexpected error can't convert system.object to a blue prism data type</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/55245#M9620</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;You will probably need to handle the output data type, see this article: &lt;A href="https://community.blueprism.com/communities/community-home/digestviewer/viewthread?GroupId=145&amp;amp;MID=4443&amp;amp;CommunityKey=3743dbaa-6766-4a4d-b7ed-9a98b6b1dd01&amp;amp;tab" target="test_blank"&gt;https://community.blueprism.com/communities/community-home/digestviewer/viewthread?GroupId=145&amp;amp;MID=4443&amp;amp;CommunityKey=3743dbaa-6766-4a4d-b7ed-9a98b6b1dd01&amp;amp;tab&lt;/A&gt; =digestviewer&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;The solution is very similar.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Leonardo Soares&lt;BR /&gt;RPA Developer Tech Leader&lt;BR /&gt;Bridge Consulting&lt;BR /&gt;América/Brazil&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Sat, 06 Jan 2024 21:34:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/55245#M9620</guid>
      <dc:creator>LeonardoSQueiroz</dc:creator>
      <dc:date>2024-01-06T21:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: RE: Unexpected error can't convert system.object to a blue prism data type</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/113043#M50626</link>
      <description>&lt;P&gt;I'm getting "Page not found"&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 07:12:22 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/113043#M50626</guid>
      <dc:creator>andber</dc:creator>
      <dc:date>2024-08-13T07:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected error can't convert system.object to a blue prism data type</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/113049#M50629</link>
      <description>&lt;P&gt;It's likely that there are data types from the DB that do not naturally match the BP datatypes, and some sort of manipulation is required. GUID is a typical example, it's everywhere in the DB and needs to be converted to make it output-able as the Text BP data type, e.g. CONVERT(NVARCHAR(36), ProcessID).&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 08:22:26 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/113049#M50629</guid>
      <dc:creator>John__Carter</dc:creator>
      <dc:date>2024-08-13T08:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected error can't convert system.object to a blue prism data type</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/116623#M52222</link>
      <description>&lt;P&gt;I fixed my case by removing &lt;STRONG&gt;typeof(object)&lt;/STRONG&gt; from red line below and I am able to get the result into BP Collection.&lt;BR /&gt;&lt;BR /&gt;my code e.g.&amp;nbsp;&lt;BR /&gt;foreach (var field in fields)&lt;BR /&gt;{&lt;BR /&gt;//if (!dataTable.Columns.Contains(field.Name) &amp;amp;&amp;amp; !field.Name.StartsWith("@odata.etag"))&lt;BR /&gt;if (!dataTable.Columns.Contains(field.Name))&lt;BR /&gt;{&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;dataTable.Columns.Add(field.Name, typeof(object));&lt;/STRONG&gt;&lt;/FONT&gt; // Add column if it doesn't exist&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;&lt;BR /&gt;hope this will give you some idea.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 20:47:21 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/116623#M52222</guid>
      <dc:creator>smssubhani</dc:creator>
      <dc:date>2024-10-28T20:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected error can't convert system.object to a blue prism data type</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/118434#M52738</link>
      <description>&lt;P&gt;I am also having this error.&lt;BR /&gt;I don't have "typeof(object)" anywhere in my code.&lt;BR /&gt;If I perform a simple Select * from &amp;lt;table&amp;gt;, it works fine.&lt;BR /&gt;And the query I'm using has worked fine many times before, and works fine in DB Browser for SQLite.&lt;BR /&gt;The query explicitly casts all fields as text to avoid type issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The codestage looks like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;message = string.Empty;
success = false;
result = new DataTable();

using (SQLiteConnection dbConnection = new SQLiteConnection(string.Format("Data Source={0}", db)))
{
	try
	{
		dbConnection.Open();
		//Execute query and load result into the result datatable. Datatable will be empty if query is not a SELECT.
		SQLiteCommand sqlc = new SQLiteCommand(query, dbConnection);
		SQLiteDataReader r = sqlc.ExecuteReader();
		result.Load(r);
		
		// If not SELECT statement, get affected rows, else if select, print rows returned
		bool contains = query.IndexOf("SELECT", StringComparison.OrdinalIgnoreCase) &amp;gt;= 0;
		if(contains == false){
			sqlc = new SQLiteCommand("SELECT CHANGES()", dbConnection);
			r = sqlc.ExecuteReader();

			while (r.Read())
			{
				//Return message for everything else than SELECT
				message = string.Format("Query completed. Rows affected: {0}", r[0].ToString());
				success = true;
			}
		}
		else 
		{
			//Return message for SELECT queries
			message = string.Format("Query completed. Rows returned: {0}", result.Rows.Count);
			success = true;
		}
	}
	catch (Exception ex)
	{
		message = (ex.Message);
		success = false;
	}

	dbConnection.Close();
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;And the query looks like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/*
##TABLE A## Is replaced by the Current Periode Voucher Row Analysis table
##TABLE B## Is replaced by the newest Sugar Report table
*/
SELECT
 CAST(			a.[Vou Type]																			AS TEXT) AS [Vou Type]
,CAST(			a.[Function Group]																		AS TEXT) AS [Function Group]
,CAST(			a.[Vou No]																				AS TEXT) AS [Vou No]
,CAST(			a.[Row No]																				AS TEXT) AS [Row No]
,CAST(			a.[Voucher Date]																		AS TEXT) AS [Voucher Date]
,CAST(			a.[Year]																				AS TEXT) AS [Year]
,CAST(			a.[Period]																				AS TEXT) AS [Period]
,CAST(			a.[Year period key]																		AS TEXT) AS [Year period key]
,CAST(			a.[Entry Date]																			AS TEXT) AS [Entry Date]
,CAST(			a.[Entered By User Group]																AS TEXT) AS [Entered By User Group]
,CAST(			a.[Entered By User]																		AS TEXT) AS [Entered By User]
,CAST(			a.[Approved By User Group]																AS TEXT) AS [Approved By User Group]
,CAST(			a.[Approved By User]																	AS TEXT) AS [Approved By User]
,CAST(			a.[Correction]																			AS TEXT) AS [Correction]
,CAST(			a.[Multi Company Voucher]																AS TEXT) AS [Multi Company Voucher]
,CAST(			a.[Simulation Voucher]																	AS TEXT) AS [Simulation Voucher]
,CAST( SUBSTR(	a.[Account],								1,	INSTR(a.[Account], ' - ') - 1)			AS TEXT) AS [Account TMP]
,CAST( SUBSTR(	a.[Account],									INSTR(a.[Account], ' - ') + 3)			AS TEXT) AS [Account Description TMP]
,CAST( SUBSTR(	a.[Cost Center],							1,	INSTR(a.[Cost Center], ' - ') - 1)		AS TEXT) AS [Cost Center TMP]
,CAST(			b.[Sugar project ID] 																	AS TEXT) AS [Project Id Ax]
,CAST(			a.[Amount]																				AS TEXT) AS [Amount]
,CAST( SUBSTR(	a.[Operations],								1,	INSTR(a.[Operations], ' - ') - 1)		AS TEXT) AS [Operations TMP]
,CAST( SUBSTR(	a.[Operations],									INSTR(a.[Operations], ' - ') + 3)		AS TEXT) AS [Operations Description TMP]
,CAST( SUBSTR(	a.[Cost Center],								INSTR(a.[Cost Center], ' - ') + 3)		AS TEXT) AS [Cost Center Description TMP]
,CAST( SUBSTR(	a.[Node],									1,	INSTR(a.[Node], ' - ') - 1)				AS TEXT) AS [Node TMP]
,CAST( SUBSTR(	a.[Node],										INSTR(a.[Node], ' - ') + 3)				AS TEXT) AS [Node Description TMP]
,CAST( SUBSTR(	a.[Project],								1,	INSTR(a.[Project], ' - ') - 1)			AS TEXT) AS [Project TMP]
,CAST( SUBSTR(	a.[Project],									INSTR(a.[Project], ' - ') + 3)			AS TEXT) AS [Project Description TMP]
,CAST( SUBSTR(	a.[Cust type],								1,	INSTR(a.[Cust type], ' - ') - 1)		AS TEXT) AS [Cust type TMP]
,CAST( SUBSTR(	a.[Cust type],									INSTR(a.[Cust type], ' - ') + 3)		AS TEXT) AS [Cust type Description TMP]
,CAST( SUBSTR(	a.[Asset group],							1,	INSTR(a.[Asset group], ' - ') - 1)		AS TEXT) AS [Asset group TMP]
,CAST( SUBSTR(	a.[Asset group],								INSTR(a.[Asset group], ' - ') + 3)		AS TEXT) AS [Asset group Description TMP]
,CAST( SUBSTR(	a.[F.Asset],								1,	INSTR(a.[F.Asset], ' - ') - 1)			AS TEXT) AS [F.Asset TMP]
,CAST( SUBSTR(	a.[F.Asset],									INSTR(a.[F.Asset], ' - ') + 3)			AS TEXT) AS [F.Asset Description TMP]
,CAST( SUBSTR(	a.[Currency],								1,	INSTR(a.[Currency], ' - ') - 1)			AS TEXT) AS [Currency TMP]
,CAST( SUBSTR(	a.[Currency],									INSTR(a.[Currency], ' - ') + 3)			AS TEXT) AS [Currency Description TMP]
,CAST(			a.[Currency Code]																		AS TEXT) AS [Currency Code]
,CAST(			a.[Currency Rate]																		AS TEXT) AS [Currency Rate]
,CAST(			a.[Conversion Factor]																	AS TEXT) AS [Conversion Factor]
,CAST(			a.[Debit Amount]																		AS TEXT) AS [Debit Amount]
,CAST(			a.[Credit Amount]																		AS TEXT) AS [Credit Amount]
,CAST(			a.[Currency Debit Amount]																AS TEXT) AS [Currency Debit Amount]
,CAST(			a.[Currency Credit Amount]																AS TEXT) AS [Currency Credit Amount]
,CAST(			a.[Currency Amount]																		AS TEXT) AS [Currency Amount]
,CAST(			a.[Debit Amount in Parallel Currency]													AS TEXT) AS [Debit Amount in Parallel Currency]
,CAST(			a.[Credit Amount in Parallel Currency]													AS TEXT) AS [Credit Amount in Parallel Currency]
,CAST(			a.[Amount in Parallel Currency]															AS TEXT) AS [Amount in Parallel Currency]
,CAST(			a.[Parallel Currency Rate]																AS TEXT) AS [Parallel Currency Rate]
,CAST(			a.[Parallel Curr Conv Factor]															AS TEXT) AS [Parallel Curr Conv Factor]
,CAST(			a.[Text]																				AS TEXT) AS [Text]
,CAST(			a.[Quantity]																			AS TEXT) AS [Quantity]
,CAST(			a.[Process Code]																		AS TEXT) AS [Process Code]
,CAST( SUBSTR(	a.[Delivery Type],							1,	INSTR(a.[Delivery Type], ' - ') - 1)	AS TEXT) AS [Delivery Type TMP]
,CAST( SUBSTR(	a.[Delivery Type],								INSTR(a.[Delivery Type], ' - ') + 3)	AS TEXT) AS [Delivery Type Description TMP]
,CAST(			a.[Tax Code]																			AS TEXT) AS [Tax Code]
,CAST(			a.[Proj Activity Seq No]																AS TEXT) AS [Proj Activity Seq No]
,CAST(			a.[Identity]																			AS TEXT) AS [Identity]
,CAST(			a.[Name]																				AS TEXT) AS [Name]
,CAST(			a.[Transaction Code]																	AS TEXT) AS [Transaction Code]
,CAST(			a.[Corrected]																			AS TEXT) AS [Corrected]
,CAST(			a.[Reference Series]																	AS TEXT) AS [Reference Series]
,CAST(			a.[Reference Number]																	AS TEXT) AS [Reference Number]
,CAST(			a.[Matching Date]																		AS TEXT) AS [Matching Date]
,CAST(			a.[Matching Period]																		AS TEXT) AS [Matching Period]
,CAST(			a.[Matching ID]																			AS TEXT) AS [Matching ID]
,CAST(			a.[Settlement Date]																		AS TEXT) AS [Settlement Date]
,CAST(			a.[Journal ID]																			AS TEXT) AS [Journal ID]
,CAST(			a.[Sequence No]																			AS TEXT) AS [Sequence No]
,CAST(			a.[Exclude from Periodical Capitalization]												AS TEXT) AS [Exclude from Periodical Capitalization]
,CAST(			b.[Case]																				AS TEXT) AS [Sugar Case]
,CAST(			b.[Internal Project Status]																AS TEXT) AS [Sugar status]
,CAST(			b.[Segment]																				AS TEXT) AS [Sugar Segment]
,CAST(			b.[Approved costs]																		AS TEXT) AS [Sugar Approved Cost]
,CAST(			b.[Financially complete date]															AS TEXT) AS [Fin.compl.date]
,CAST(			''																						AS TEXT) AS [Aktivert tidligere]
,CAST(			''																						AS TEXT) AS [Aktiveres]
,CAST(			''																						AS TEXT) AS [Object id]
FROM [##TABLE A##] AS a
LEFT JOIN(
			SELECT DISTINCT
				 [IFS project ID]
				,[Sugar project ID]
				,[Internal Project Status]
				,[Segment]
				,[Financially complete date]
				,[Approved costs]
				,[Case]
			FROM [##TABLE B##] /* Sugar Report */
		) AS b
        ON	SUBSTR(a.[Project], 1, INSTR(a.[Project], ' - ') - 1) = b.[IFS project ID]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have a clue?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2025 08:52:04 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/118434#M52738</guid>
      <dc:creator>andber</dc:creator>
      <dc:date>2025-01-23T08:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected error can't convert system.object to a blue prism data type</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/118438#M52740</link>
      <description>&lt;P&gt;Actually. I figured my issue out.&lt;BR /&gt;Some of the columns had NULL values, which caused the issue.&lt;BR /&gt;I put a IFNULL(&amp;lt;column&amp;gt;,'') to change NULL to no value, before casting it to text, and that worked.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2025 09:27:55 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Unexpected-error-can-t-convert-system-object-to-a-blue-prism/m-p/118438#M52740</guid>
      <dc:creator>andber</dc:creator>
      <dc:date>2025-01-23T09:27:55Z</dc:date>
    </item>
  </channel>
</rss>

