Showing posts with label errorthe. Show all posts
Showing posts with label errorthe. Show all posts

Sunday, February 26, 2012

Error:The type initializer for "Microsoft.ReportDesigner.Drawing.Language" threw an except

Hi,
I've been trying to get to the bottom of this error it prevents be
from loading the report in Design Mode. As of right now when opening
a report in design mode through the VS .Net 2003 IDE I get the
following:
Deserialization failed: The type initializer for
"Microsoft.ReportDesigner.Drawing.Language" threw an exception.
I've tried uninstall/reinstall, reporting services service pack 1 and
debuging the devenv.exe from another ide instance. Debug error is:
System.ComponentModel.Design.Serialization.CodeDomSerializerException:
Deserialization failed: The type initializer for
"Microsoft.ReportDesigner.Drawing.Language" threw an exception. -->
Microsoft.DataWarehouse.Serialization.XmlSerializationException:
Deserialization failed: The type initializer for
"Microsoft.ReportDesigner.Drawing.Language" threw an exception. -->
System.TypeInitializationException: The type initializer for
"Microsoft.ReportDesigner.Drawing.Language" threw an exception. -->
System.ArgumentException: Culture ID 31770 (0x7C1A) is not a supported
culture.
Parameter name: culture
at System.Globalization.CultureInfo..ctor(Int32 culture, Boolean
useUserOverride)
at System.Globalization.CultureTable.GetCultures(CultureTypes
types)
at Microsoft.ReportDesigner.Drawing.Language.GetStandardValues()
at Microsoft.ReportDesigner.Drawing.Language..cctor()
-- End of inner exception stack trace --
at Microsoft.ReportDesigner.Drawing.Language..ctor(String value)
at Microsoft.ReportDesigner.Drawing.LanguageConverter.CreateObject(String
value)
at Microsoft.ReportDesigner.Drawing.XmlStringListConverter.ConvertFrom(ITypeDescriptorContext
context, CultureInfo culture, Object value)
at System.ComponentModel.DefaultValueAttribute..ctor(Type type,
String value)
-- End of inner exception stack trace --
at Microsoft.ReportDesigner.Serialization.DesignXmlReader.ReadRoot(Type
type)
at Microsoft.ReportDesigner.Serialization.DesignXmlReader.DeserializeComponent(IDesignerSerializationManager
manager, XmlReader reader, Type root)
at Microsoft.ReportDesigner.Serialization.DesignXmlSerializer.DeserializeObject(IDesignerSerializationManager
manager, Object serializationStream)
at Microsoft.ReportDesigner.Serialization.DesignXmlSerializer.Deserialize(IDesignerSerializationManager
manager, Object serializationStream)
at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseDesignerLoader.Deserialize()Hi, I got the same error here, if you already fixed this problem, please post
here waht is going on.
Thanks, Rafael
"Ricardo" wrote:
> Hi,
> I've been trying to get to the bottom of this error it prevents be
> from loading the report in Design Mode. As of right now when opening
> a report in design mode through the VS .Net 2003 IDE I get the
> following:
> Deserialization failed: The type initializer for
> "Microsoft.ReportDesigner.Drawing.Language" threw an exception.
> I've tried uninstall/reinstall, reporting services service pack 1 and
> debuging the devenv.exe from another ide instance. Debug error is:
> System.ComponentModel.Design.Serialization.CodeDomSerializerException:
> Deserialization failed: The type initializer for
> "Microsoft.ReportDesigner.Drawing.Language" threw an exception. -->
> Microsoft.DataWarehouse.Serialization.XmlSerializationException:
> Deserialization failed: The type initializer for
> "Microsoft.ReportDesigner.Drawing.Language" threw an exception. -->
> System.TypeInitializationException: The type initializer for
> "Microsoft.ReportDesigner.Drawing.Language" threw an exception. -->
> System.ArgumentException: Culture ID 31770 (0x7C1A) is not a supported
> culture.
> Parameter name: culture
> at System.Globalization.CultureInfo..ctor(Int32 culture, Boolean
> useUserOverride)
> at System.Globalization.CultureTable.GetCultures(CultureTypes
> types)
> at Microsoft.ReportDesigner.Drawing.Language.GetStandardValues()
> at Microsoft.ReportDesigner.Drawing.Language..cctor()
> -- End of inner exception stack trace --
> at Microsoft.ReportDesigner.Drawing.Language..ctor(String value)
> at Microsoft.ReportDesigner.Drawing.LanguageConverter.CreateObject(String
> value)
> at Microsoft.ReportDesigner.Drawing.XmlStringListConverter.ConvertFrom(ITypeDescriptorContext
> context, CultureInfo culture, Object value)
> at System.ComponentModel.DefaultValueAttribute..ctor(Type type,
> String value)
> -- End of inner exception stack trace --
> at Microsoft.ReportDesigner.Serialization.DesignXmlReader.ReadRoot(Type
> type)
> at Microsoft.ReportDesigner.Serialization.DesignXmlReader.DeserializeComponent(IDesignerSerializationManager
> manager, XmlReader reader, Type root)
> at Microsoft.ReportDesigner.Serialization.DesignXmlSerializer.DeserializeObject(IDesignerSerializationManager
> manager, Object serializationStream)
> at Microsoft.ReportDesigner.Serialization.DesignXmlSerializer.Deserialize(IDesignerSerializationManager
> manager, Object serializationStream)
> at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseDesignerLoader.Deserialize()
>|||I have problem in Reporting Services 2005 with width of report - max. limit is probably 406,34921 cm. Is it possible to increase this limit to for exapmle 450 cm ?
From http://www.developmentnow.com/g/115_2004_11_0_0_453315/ErrorThe-type-initializer-for-Microsoft-ReportDesigner-Drawing-Language-threw-an-exception.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com

error:the string was not recognized as a valid DateTime.

hi all, i'm trying to insert the time/date a button was clicked on a gridview and it generates an error:the string was not recognized as a valid DateTime.There is an unknown word starting at index 0 i have changed the culture to en-US but it still doesn't work. i actually created the date/time column after some data had been entered into the table so the column allows nulls. this is my code:

InsertCommand="INSERT INTO test101(Surname,Names,Registration,Login Time)VALUES (@.Surname, @.Names, @.Registration,@.Login_Time)"

<Insert Parameters><asp:Parameter DefaultValue= DateTime.Now Type=DateTime Name="Login_Time" /></Insert Parameters
any suggestions?

When do you recieve that error? You mentioned button on a GridView, so I suppose that you're trying to update some values and, if that's the case, use this code:

protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
e.NewValues["Login_Time"] = DateTime.Now;
}

If, on the other hand, you're trying to insert some values in database, use this code (this is example for inserting values with DetailsView ):

protected void DetailsView1_ItemInserting(object sender, DetailsViewInsertEventArgs e)
{
e.Values["Login_Time"] = DateTime.Now;
}

|||

sorry, this message was supposed to be:

hi all, i'm trying to insert the time/date at the time a user clicks the submit button but it generates an error:the string was not recognized as a valid DateTime.There is an unknown word starting at index 0 i have changed the culture to en-US but it still doesn't work. this is my code:

InsertCommand="INSERT INTO test101(Surname,Names,Registration,Login Time)VALUES (@.Surname, @.Names, @.Registration,@.Login_Time)"

<Insert Parameters><asp:Parameter DefaultValue= DateTime.Now Type=DateTime Name="Login_Time" /></Insert Parameters
any suggestions?

|||

Where is that submit button (in DetailsView or in FormView)?

|||

it's on a login page. so i want the time the user logged on to be saved on a database

|||

Can you post your whole code?

|||

One way to achieve your goal is to change your InsertParameter into this:

<Insert Parameters><asp:Parameter Type="DateTime" Name="Login_Time" /></Insert Parameters>

and put this in Page_Load event:

SqlDataSource1.InsertParameters["Login_Time"].DefaultValue = DateTime.Now.ToString();

|||<asp:ButtonID="login1"runat="server"Text="Login"

Height="31px"OnClick="login1_Click"Width="65px"BackColor="#E0E0E0"Font-Size="Medium"/>

<asp:ButtonID="Reset1"runat="server"BackColor="#E0E0E0"Font-Size="Medium"

Height="32px"OnClick="Reset1_Click"Text="Reset"Width="63px"/>

<br/>

<br/>

<asp:SqlDataSourceID="SqlDataSource1"runat="server"

ConnectionString="<%$ ConnectionStrings:engineeringConnectionString %>"

InsertCommand="INSERT INTO test101(Surname,Names,Registration,[Course code],[Login Time]) VALUES (@.Surname,@.Names,@.Registration,@.Course_code,@.Login_Time)">

<InsertParameters>

<asp:ControlParameterControlID="TextBox1"DefaultValue="Textbox1.Text"Name="Surname"

PropertyName="Text"/>

<asp:ControlParameterControlID="TextBox2"DefaultValue="TextBox2.Text"Name="Names"

PropertyName="Text"/>

<asp:ControlParameterControlID="TextBox3"DefaultValue="TextBox3.Text"Name="Registration"

PropertyName="Text"/>

<asp:ControlParameterControlID="TextBox4"DefaultValue="TextBox4.Text"Name="Course_code"

PropertyName="Text"/>

<asp:Parameter Name="Login_Time" type=DateTime/>

</InsertParameters>

</asp:SqlDataSource>

<asp:GridViewID="GridView1"

runat="server"AutoGenerateColumns="False"AutoGenerateDeleteButton="True"DataKeyNames="ID"

AutoGenerateEditButton="True"AllowSorting="True"BackColor="LightGoldenrodYellow"BorderColor="Tan"BorderWidth="1px"CellPadding="2"ForeColor="Black"GridLines="None"PageSize="20"

Height="374px"EmptyDataText="null"DataSourceID=SqlDataSource1Visible="False"AllowPaging="True">

<Columns>

<asp:BoundFieldDataField="ID"HeaderText="ID"InsertVisible="False"ReadOnly="True"

SortExpression="ID"/>

<asp:BoundFieldDataField="Surname"HeaderText="Surname"SortExpression="Surname"/>

<asp:BoundFieldDataField="Names"HeaderText="Names"SortExpression="Names"/>

<asp:BoundFieldDataField="Registration"HeaderText="Registration"SortExpression="Registration"/>

<asp:BoundFieldDataField="Course code"HeaderText="Course code"SortExpression="Course code"/>

<asp:BoundFieldDataField="Grade"HeaderText="Grade"SortExpression="Grade"/>

<asp:BoundFieldDataField="login Time"HeaderText="Login Time"SortExpression="login Time"/>

</Columns>

</asp:GridView>

and this is the code behind:

protectedvoid Page_Load(object sender,EventArgs e)

{

SqlConnection conn =newSqlConnection("Data Source=(local);Initial Catalog=engineering; Integrated Security=True");

conn.Open();

GridView1.DataBind();

conn.Close();

}

publicvoid login1_Click(object sender,EventArgs e)

{

SqlDataSource1.Insert();

if (TextBox1.Text !="" && TextBox2.Text !="" && TextBox3.Text !="" && TextBox4.Text !="")

{

Response.Redirect("test1.aspx");

}

|||

Just add SqlDataSource1.InsertParameters["Login_Time"].DefaultValue = DateTime.Now.ToString(); in login1_Click event like this:

public void login1_Click(object sender, EventArgs e)
{
SqlDataSource1.InsertParameters["Login_Time"].DefaultValue = DateTime.Now.ToString();
SqlDataSource1.Insert();
if (TextBox1.Text != "" && TextBox2.Text != "" && TextBox3.Text != "" && TextBox4.Text !="")
{
Response.Redirect("test1.aspx");
}

And one question: Why are you opening connection in Page_Load event?:

SqlConnection conn = new SqlConnection("Data Source=(local);Initial Catalog=engineering; Integrated Security=True");
conn.Open();
GridView1.DataBind();
conn.Close();

If you're using SqlDataSource this is unnecessarily.

|||

THANK YOU SO MUCH!!!!!

Error:The precision must be between 1 and 38.

Hi All

I am trying to pull data from Oracle to SQL Server but if I use Oledb Source than I get this error

Error at Data Flow Task [DTS.Pipeline]: The "output column "CUST_ID" (590)" has a precision that is not valid. The precision must be between 1 and 38.


ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC0204018 (Microsoft.SqlServer.DTSPipelineWrap)


The only solution I found is use DataReader Source,

But if I use DataReader Source everything works fine , I mean I am able to see the records and convert it desired data type (using Data Convertion component).

My question is what component should I use as Destination, coz if I use OLEDB Desination I get a red cross on the components although I can map all the columns.....

I believe you need to convert that column to have a precision of 1 or greater in the query that you use to get at the data. Search this forum for examples. You're not the first with this issue.|||

I fixed the error which I was getting with DataReader Source. Everthing is Ok at design time but I get this error at the source at runtime:

[DataReader Source [1]] Error: System.Data.OleDb.OleDbException: Oracle error occurred, but error message could not be retrieved from Oracle.
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo,
DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection

owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open() at Microsoft.SqlServer.Dts.Runtime.ManagedHelper.GetManagedConnection(String assemblyQualifiedName,
String connStr, Object transaction) at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSConnectionManager90.AcquireConnection(Object pTransaction)
at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.AcquireConnections(Object transaction)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostAcquireConnections(IDTSManagedComponentWrapper90 wrapper, Object transaction)

|||Try your query in SQL*Plus or some other Oracle client to see if it errors out there as well.|||

I've dealt a lot with this error. So far I've found two solutions:

1) Cast column to NUMBER(precision, scale) in Oracle select (eg. select CAST(columnName as NUMBER(10, 3)) as columName from ..

2) Cast to string in Oracle select (eg. select TO_CHAR(columnName) as columName from ..

For more info, check out this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1432727&SiteID=1

Another common problem when selecting from Oracle is getting the error "accessor is not a parameter accessor", which you get when precision from a calculation in the select exceeds 38. For example when you divide two columns. ADO can not handle the same amount of precision that the Oracle select can handle. Anyway, to overcome this problem you cast the column (or expression (division)) to char (TO_CHAR(....)) and then you specify precision and scale (preferred) when you do the insert or substring the result to fit the target column.

Code (VB.NET): Dim para5 As New OleDb.OleDbParameter("myParamName", OleDb.OleDbType.Numeric)
para5.Value = myReader.Item("myColumn")
para5.Scale = CByte(10)
para5.Precision = CByte(22)

More about accessor is not a parameter accessor (only one google hit, and is cached):

http://www.google.com/search?q=cache:ZVTf6GErxyIJ:www.dotnetforums.com/archive/index.php/t-398.html+Conversion+failed+because+the+Decimal+data+value+overflowed+the+type+specified+for+the+Decimal+value+part+in+the+consumer's+buffer.&hl=sv&strip=1

|||

I don't know what's wrong , this is driving me crazy....this package was working fine till last week n now it is giving error

[Source-AP [1]] Error: The AcquireConnection method call to the connection manager "MS_OLEDB" failed with error code 0xC0202009.
[DTS.Pipeline] Error: component "Source-AP" (1) failed validation and returned error code 0xC020801C.

I am able to see the data preview and column mapping etc

Error:The precision must be between 1 and 38.

Hi All

I am trying to pull data from Oracle to SQL Server but if I use Oledb Source than I get this error

Error at Data Flow Task [DTS.Pipeline]: The "output column "CUST_ID" (590)" has a precision that is not valid. The precision must be between 1 and 38.


ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC0204018 (Microsoft.SqlServer.DTSPipelineWrap)


The only solution I found is use DataReader Source,

But if I use DataReader Source everything works fine , I mean I am able to see the records and convert it desired data type (using Data Convertion component).

My question is what component should I use as Destination, coz if I use OLEDB Desination I get a red cross on the components although I can map all the columns.....

I believe you need to convert that column to have a precision of 1 or greater in the query that you use to get at the data. Search this forum for examples. You're not the first with this issue.|||

I fixed the error which I was getting with DataReader Source. Everthing is Ok at design time but I get this error at the source at runtime:

[DataReader Source [1]] Error: System.Data.OleDb.OleDbException: Oracle error occurred, but error message could not be retrieved from Oracle.
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo,
DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection

owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open() at Microsoft.SqlServer.Dts.Runtime.ManagedHelper.GetManagedConnection(String assemblyQualifiedName,
String connStr, Object transaction) at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSConnectionManager90.AcquireConnection(Object pTransaction)
at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.AcquireConnections(Object transaction)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostAcquireConnections(IDTSManagedComponentWrapper90 wrapper, Object transaction)

|||Try your query in SQL*Plus or some other Oracle client to see if it errors out there as well.|||

I've dealt a lot with this error. So far I've found two solutions:

1) Cast column to NUMBER(precision, scale) in Oracle select (eg. select CAST(columnName as NUMBER(10, 3)) as columName from ..

2) Cast to string in Oracle select (eg. select TO_CHAR(columnName) as columName from ..

For more info, check out this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1432727&SiteID=1

Another common problem when selecting from Oracle is getting the error "accessor is not a parameter accessor", which you get when precision from a calculation in the select exceeds 38. For example when you divide two columns. ADO can not handle the same amount of precision that the Oracle select can handle. Anyway, to overcome this problem you cast the column (or expression (division)) to char (TO_CHAR(....)) and then you specify precision and scale (preferred) when you do the insert or substring the result to fit the target column.

Code (VB.NET): Dim para5 As New OleDb.OleDbParameter("myParamName", OleDb.OleDbType.Numeric)
para5.Value = myReader.Item("myColumn")
para5.Scale = CByte(10)
para5.Precision = CByte(22)

More about accessor is not a parameter accessor (only one google hit, and is cached):

http://www.google.com/search?q=cache:ZVTf6GErxyIJ:www.dotnetforums.com/archive/index.php/t-398.html+Conversion+failed+because+the+Decimal+data+value+overflowed+the+type+specified+for+the+Decimal+value+part+in+the+consumer's+buffer.&hl=sv&strip=1

|||

I don't know what's wrong , this is driving me crazy....this package was working fine till last week n now it is giving error

[Source-AP [1]] Error: The AcquireConnection method call to the connection manager "MS_OLEDB" failed with error code 0xC0202009.
[DTS.Pipeline] Error: component "Source-AP" (1) failed validation and returned error code 0xC020801C.

I am able to see the data preview and column mapping etc

Friday, February 24, 2012

Error: Unable to connect to the remote server.

I have been running RS for a month and it was working fine. However, now it is giving me the following error:

The underlying connection was closed: Unable to connect to the remote server.

Any ideas? Thanks

Is this both remotely and from the local server? And of course some of the basice questions:

Have you installed any new software?

Have you made any changes to your IIS?

Have there been any firewall changes?

Is this from all machines?

|||

Yes, this is both remotely and from the server. SQL is intalled on the remote server. The error is from all machines. The only new software installed on the IIS (where RS is intalled) is Cold Fusion. This might be the cause, but I don't understand how? No firewall changes have been made.

Thanks

|||

I don't know if this is an option, but have you tried to reinstall report services? or removing Cold Fusion. Also you may want to call the makers of Cold Fusion and see if they have heard anything like this.

To be honest I am taking stabs in the dark on this one, sorry.

Sunday, February 19, 2012

Error: The data types text and text are incompatible in the equal to operator.

I get this error:

The data types text and text are incompatible in the equal to operator.

when trying to execute this query

SELECT id FROM users WHERE username=@.userName

Any Ideas?We'll need to know te data type of the username column, as well as the SqlDbType you are using for the @.userName parameter.|||I'm using text and text.|||Can't do that. There are a number of things that you can't do with blob data types, and that's one of them. Considering the name of the field is username, I'm guessing that you should be using varchar instead.