Showing posts with label developed. Show all posts
Showing posts with label developed. Show all posts

Monday, March 19, 2012

component taking long time to load

hello all
we have an applicaion developed in ASP with SQL server as back end.
Our Application consists of many compoents (typically treated as hyperlinks in the application). now, all the components are responding fine except one component taking long time to load. I have checked my Queries in the backend and they were fine..
what could be the problem ?
I am getting an error OLEDB DRIVER TIMEOUT EXPIRED when i click on the component link.

Plese suggest me some ways...

Thanks and Regards
SAIHave you tried increasing the timeout ? What are you clicking on - what type of application ?|||Originally posted by rnealejr
Have you tried increasing the timeout ? What are you clicking on - what type of application ?

Hello,
the Application is a ASP application, and i am clicking on one of the Hyper link out of several..
Except this link all the other links are working fine..

sai|||But what type of application/database are you trying to connect to ? Have you tried to increase the timeout ? What are the connection strings like for this application that is having a problem - is it hitting a different sql server ?

Component Property Data Types - How to set?

I have developed a component, and within ProvideComponentProperties I have added a property (reflected code)-

IDTSCustomProperty90 property1 = base.get_ComponentMetaData().get_CustomPropertyCollection().New();
property1.set_Name("Seed");
property1.set_Description("The first row number.");
property1.set_Value(1);
property1.set_ExpressionType(1);
property1.set_TypeConverter(typeof(Int32Converter).AssemblyQualifiedName);

I want this to be an Int32, but where do you set this? I am having problems, because sometimes the component ends up with a Decimal type. This only becomes apparent when I try and set an expression. I get -

TITLE: Expression Builder

Cannot convert expression value to property type.
Cannot convert 'System.Int32' to 'System.Decimal'.

The expression I tried always a variable, of type Int32.

Looking at the package Xml I can see the property has been defined as Decimal, but why when I have never told it that-

<property id="18464" name="Seed" dataType="System.Decimal" state="default" isArray="false" description="The first row number." typeConverter="System.ComponentModel.Int32Converter, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UITypeEditor="" containsID="false" expressionType="Notify">1</property>

It would appear that there is no way to set the typ of property, bit limiting, and that SSIS assumes a type, since it clearly has one in the XML. If it gets this wrong
you have to hack the package Xml to recover.

I have tried this several times, and some packages have worked OK, and others get stuck with Decimal. Any ideas why?

You are setting the datatype when you call set_Value. Now why 1 is becoming a decimal I am not certain but that is what is being passed to set_Value. Try creating an Int32 variable and using that to set the value and see if that solves your problem.

HTH,
Matt|||So idea goes that the literal 1 is coming out as decimal, but if I use an explicitly typed set parameter I should remove the ambiguity. I shall give it a go.

Thanks.|||

Matt,

I am having a similar problem again, this time I want the custom property type to be an enumeration. I have tried casting, using variables all sorts, but if I check the type of the variable after I have set the value, it is always Int32. I know Int32 and Enums are pretty much interchangeable, but the issue is I want to set the TypeConverter to EnumConverter. It does not work, and I assume this is because the value type is not an Enum. In the properties grid I just get an empty drop-down.

In this sample _Algorithm is a private class variable defined as an Enum type of mine.


IDTSCustomPropertyCollection90 propertyCollection = ComponentMetaData.CustomPropertyCollection;
IDTSCustomProperty90 customProperty = propertyCollection.New();
customProperty.Name = "DDD";
customProperty.Description = "hkjhgh";
customProperty.Value = _Algorithm;
customProperty.TypeConverter = typeof(System.ComponentModel.EnumConverter).AssemblyQualifiedName;

If I check customProperty.Value.GetType().Name I always get Int32.

Any ideas? I don't want to have to write my own TypeConverter coded to the specific enum, that is maddness.

Sunday, March 11, 2012

Component Property Data Types - How to set?

I have developed a component, and within ProvideComponentProperties I have added a property (reflected code)-

IDTSCustomProperty90 property1 = base.get_ComponentMetaData().get_CustomPropertyCollection().New();
property1.set_Name("Seed");
property1.set_Description("The first row number.");
property1.set_Value(1);
property1.set_ExpressionType(1);
property1.set_TypeConverter(typeof(Int32Converter).AssemblyQualifiedName);

I want this to be an Int32, but where do you set this? I am having problems, because sometimes the component ends up with a Decimal type. This only becomes apparent when I try and set an expression. I get -

TITLE: Expression Builder

Cannot convert expression value to property type.
Cannot convert 'System.Int32' to 'System.Decimal'.

The expression I tried always a variable, of type Int32.

Looking at the package Xml I can see the property has been defined as Decimal, but why when I have never told it that-

<property id="18464" name="Seed" dataType="System.Decimal" state="default" isArray="false" description="The first row number." typeConverter="System.ComponentModel.Int32Converter, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UITypeEditor="" containsID="false" expressionType="Notify">1</property>

It would appear that there is no way to set the typ of property, bit limiting, and that SSIS assumes a type, since it clearly has one in the XML. If it gets this wrong
you have to hack the package Xml to recover.

I have tried this several times, and some packages have worked OK, and others get stuck with Decimal. Any ideas why?

You are setting the datatype when you call set_Value. Now why 1 is becoming a decimal I am not certain but that is what is being passed to set_Value. Try creating an Int32 variable and using that to set the value and see if that solves your problem.

HTH,
Matt|||So idea goes that the literal 1 is coming out as decimal, but if I use an explicitly typed set parameter I should remove the ambiguity. I shall give it a go.

Thanks.|||

Matt,

I am having a similar problem again, this time I want the custom property type to be an enumeration. I have tried casting, using variables all sorts, but if I check the type of the variable after I have set the value, it is always Int32. I know Int32 and Enums are pretty much interchangeable, but the issue is I want to set the TypeConverter to EnumConverter. It does not work, and I assume this is because the value type is not an Enum. In the properties grid I just get an empty drop-down.

In this sample _Algorithm is a private class variable defined as an Enum type of mine.


IDTSCustomPropertyCollection90 propertyCollection = ComponentMetaData.CustomPropertyCollection;
IDTSCustomProperty90 customProperty = propertyCollection.New();
customProperty.Name = "DDD";
customProperty.Description = "hkjhgh";
customProperty.Value = _Algorithm;
customProperty.TypeConverter = typeof(System.ComponentModel.EnumConverter).AssemblyQualifiedName;

If I check customProperty.Value.GetType().Name I always get Int32.

Any ideas? I don't want to have to write my own TypeConverter coded to the specific enum, that is maddness.

Component not showing "Show Advanced Editor" in menu

Hi,
I've developed a couple of components now and I know I've seen this problem before but I can't remember how to solve it. My component is built, it has it's own (blank at the moment) UI and it seems to work fine except that there is no right click option to look at the advanced editor. The code is almost identical to another component I wrote that works just fine.
Any ideas anyone?
Thanks
Charlie.The component has more than one input. This apparenty silently disables Advanced Editor support.

Friday, February 17, 2012

Compatiblity of SQLDMO and SQLSMO with respect to scripting via COM

Hi all,

I need your help:

Context:
I have developed since long an installation with InstallShield's InstallScript language. This installation "talks" to SQLServer2000 in order to install, upgrade, backup and restore the application's database. All this is done in the InstallScript code using SQLDMO currently, using the COM interface as if using VB script.

Problem:
Now as we are preparing to support installation on SQL2005, I am investigating the usage of SQLSMO, as SQLDMO cannot be excepted on all target systems (SQLExpress must be supported, too).

I looked in the SMO namespace and recognized, that the contained classes are registered as COM objects, too. Due to this I have no problem creating a Microsoft.SqlServer.Management.Smo.Server object from my scripting code.
But - opposed to SQLDMO the SMO server object does not have a Connect() method.

Looking further I found the Microsoft.SqlServer.Management.Common.ServerConnection object which seems to have the functionality I need - but this object is not registered as a COM object and as such is not scriptable - I am stuck :-(

Generally it seems, that SQLSMO is by far not a replacement or enhancement to SQLDMO. So - how to solve tasks which where using SQLDMO up to now?

Please - give advice!

Thanks,
Jo

Sorry, Jo, you're correct with respect to COM support for SMO - it's not there. It's not hard to build a VB console application to do what you're attempting, though, and then you can connect to the server either through the Connect() method or by setting arguments in the ServerConnection object. I've used both successfully.

There's a lot of argument in this forum whether or not SMO is an enhancement to DMO, and while some have had some performance issues with SMO, I feel that the object model is much more straightforward and easy to use than its predecessor. We just have to approach things differently.

Sunday, February 12, 2012

Compatibility issues between Vista/XP?

HI

I have just started using SQL Server Compact Edition. I have developed a test application just to see if it fits my needs but found something extremely weird.

It's so strange that I guess I'm doing something wrong...

I create the database programmatically from my application if it doesn't exist or open the existing one in the same directory.

The question is that...
When I create a DB from Windows Vista, I can use it normally in that computer and on any other Vista OS computer... but this DB won't work on an XP or 2003!
The opposite applies as well, DBs generated from the same application running on XPs won't work when opening them on Vista. I.E. it seems that DBs generated in those OS are not compatible.

I'm using v3.1 from a c# .Net2 application. I'm not using encryption or anything, just the simplest ConnectionString.

The exception is thrown then I connect and its Message is "Attempted to read or write protected memory. This is often an indication that other memory is corrupt".

Have you ever seen this?
I there something I could test/change?

Thanks in advance.You could try to send me the SDF file and I will test (winxp sp2), if I can reproduce...|||You can download the database I generated on Windows Vista from here.

The Windows XP test machine is a Virtual PC with Windows XP SP2 and all the updates applied. Both computers have the same language settings and I've even made my app to select the CurrentThread's Culture to "en-US" to avoid possible language problems.|||Erik told me via email that he was able to open the DB in his WinXP using the SQL Management Studio.

So I installed a development environment in a WinXP virtual machine to see what happened... results:

After installing VS2005 + SQLServer2005 + SQLServerCE:
1) A connection cannot be stablished from a .Net application
2) The database can be opened from SQL Server Management Studio

but (and this is the most interesting part)

3) After opening the DB with the Management Studio, the database file is modified (checked size and date) and now it CAN be opened from the same .Net application.

so, the SQL Server Management Studio is "fixing" the database.

4) The "fixed" database now works in XP and Vista.

will continue investigating.

(for your information. The original Vista database was generated programatically creating everything using SQL commands).|||More info:

Repairing the database (SQLCeEngine.Repair) works more or less.

- If I repair the Vista-generated database in WixXP before opening it, it will work.

- If I repair it in Vista and then try to open it in XP it won't work.
- In the other hand... if I repair the DB in XP it won't work in Vista.

So, it seems like you have to repair the database before opening it on the other OS. And repairing it on one makes it incompatible on the other.

ajjjjjj!!!!|||

Ok, Fernando.

Using the supplied app and sdf and this connection string, it get the same error (on XP SP2)

Code Snippet

Data Source ="TestDBIbistic2007.sdf"; File Mode=Read Only; Temp Path = %temp%

It is fixed by changing the connection string to:

Code Snippet

Data Source ="TestDBIbistic2007.sdf"

So the sdf is in a bad state somehow...

|||The database will be located in a read-only drive, that's why I added the "FileMode=Read Only" thing (and therefore "Temp Path=%temp%").

I will test if I can open the database without the Read Only modifier from a read only folder.
Another solution is to copy the database (that shouldn't be too big) to the temp folder and use it from there...

Anyway

Thanks a lot for your help, Erik!

Compatibility issues between Vista/XP?

HI

I have just started using SQL Server Compact Edition. I have developed a test application just to see if it fits my needs but found something extremely weird.

It's so strange that I guess I'm doing something wrong...

I create the database programmatically from my application if it doesn't exist or open the existing one in the same directory.

The question is that...
When I create a DB from Windows Vista, I can use it normally in that computer and on any other Vista OS computer... but this DB won't work on an XP or 2003!
The opposite applies as well, DBs generated from the same application running on XPs won't work when opening them on Vista. I.E. it seems that DBs generated in those OS are not compatible.

I'm using v3.1 from a c# .Net2 application. I'm not using encryption or anything, just the simplest ConnectionString.

The exception is thrown then I connect and its Message is "Attempted to read or write protected memory. This is often an indication that other memory is corrupt".

Have you ever seen this?
I there something I could test/change?

Thanks in advance.You could try to send me the SDF file and I will test (winxp sp2), if I can reproduce...|||You can download the database I generated on Windows Vista from here.

The Windows XP test machine is a Virtual PC with Windows XP SP2 and all the updates applied. Both computers have the same language settings and I've even made my app to select the CurrentThread's Culture to "en-US" to avoid possible language problems.|||Erik told me via email that he was able to open the DB in his WinXP using the SQL Management Studio.

So I installed a development environment in a WinXP virtual machine to see what happened... results:

After installing VS2005 + SQLServer2005 + SQLServerCE:
1) A connection cannot be stablished from a .Net application
2) The database can be opened from SQL Server Management Studio

but (and this is the most interesting part)

3) After opening the DB with the Management Studio, the database file is modified (checked size and date) and now it CAN be opened from the same .Net application.

so, the SQL Server Management Studio is "fixing" the database.

4) The "fixed" database now works in XP and Vista.

will continue investigating.

(for your information. The original Vista database was generated programatically creating everything using SQL commands).|||More info:

Repairing the database (SQLCeEngine.Repair) works more or less.

- If I repair the Vista-generated database in WixXP before opening it, it will work.

- If I repair it in Vista and then try to open it in XP it won't work.
- In the other hand... if I repair the DB in XP it won't work in Vista.

So, it seems like you have to repair the database before opening it on the other OS. And repairing it on one makes it incompatible on the other.

ajjjjjj!!!!|||

Ok, Fernando.

Using the supplied app and sdf and this connection string, it get the same error (on XP SP2)

Code Snippet

Data Source ="TestDBIbistic2007.sdf"; File Mode=Read Only; Temp Path = %temp%

It is fixed by changing the connection string to:

Code Snippet

Data Source ="TestDBIbistic2007.sdf"

So the sdf is in a bad state somehow...

|||The database will be located in a read-only drive, that's why I added the "FileMode=Read Only" thing (and therefore "Temp Path=%temp%").

I will test if I can open the database without the Read Only modifier from a read only folder.
Another solution is to copy the database (that shouldn't be too big) to the temp folder and use it from there...

Anyway

Thanks a lot for your help, Erik!

Compatibility Crystal report

i have application developed in MS ACCESS 2003. (not VB and Access)
can i use CReports with my mdb;
i split the mdb into frontend and backend.
can i use CR Successfully.
Kindly reply.
ThanksSearch here
http://support.businessobjects.com/