Showing posts with label custom. Show all posts
Showing posts with label custom. Show all posts

Friday, March 23, 2012

How to enable Optimistic concurrency

I have a number of SqlDataSource objects in my application, which don't have Optimistic Concurrency option enabled. The SDS objects use custom Sql statements so I can no longer select the Advance button to enable Concurrent Concurrency.

How can I enable this option? Is there a designt ime property, and even a run time property that can be set?

The only method we have so far is to create a new SDS, with Optimistic Concurrency switched on, then copy and paste my custom Sql into it and rebind my components..

Any help on this matter is appreciated.

Regards,

Steven

SqlDataSource class dose not have corresponding member for this options, you can check the SqlDataSource element of the SqlDataSource control in which you do not choose customize statement: it seems this option acts like the ConflictDetection property. Here is a section from VS2005 documentation:

Use optimistic concurrency
This element sets how the SqlDataSource control handles conflicts when updating or deleting data. When Use optimistic concurrency is selected, the ConflictDetection property is set to the value CompareAllValues. When Use optimistic concurrency is not selected, the ConflictDetection property is set to the value OverwriteChanges, which is the default value.

|||

Thanks for the reply.

I have checked this property, hoping I could somehow enable this feature but it appears not.

This member is only useful if Optimistic Concurrency has already been set through the design settings.

It seems strange that the option can be set freely in design mode, but the developer has no option to turn this setting back on IF custom Sql has been used on the SDS.

Wednesday, March 21, 2012

How to embed Activex contol in SSRS

How to embed Activex contol in SSRS. I have created one custom library in VB.NET and tried to reference and previewed (Report -> Report Properties-> Reference), but I got following errors. Same library is working fine for other .NET applications. Is there any limitations to use .dll in SSRS, please let me know
1) "Error while loading code module:"
2) "Error in class instance declaration"
Any chance??

Monday, March 19, 2012

How to edit a custom property on an external metadata column

I am using external metadata columns in a destination data component to match sharepoint fields to input columns. I want to add a flag that the user can set to specify if a column is a lookup column (indicates that the component should look for a list item with the specified input column value, and do an update if the item already exists). I added a custom boolean property to the medata column, but the property editor does not allow me to edit the column. It appears to be enabled, but when I choose a value other than the default, the editor immediately replaces the value I chose with the default.

How do I set the property so that it is editable in the property editor? Here is the code that I am using to create the property:

private void AddLookupProperty(IDTSExternalMetadataColumn90 externalColumn)

{

IDTSCustomProperty90 lookupProperty = null;

try

{

//Check to see if the property exists. If it does, don't do anything. If it doesn't, an exception will be thrown

lookupProperty = externalColumn.CustomPropertyCollection[LOOKUP_PROPERTY_NAME];

}

catch (System.Runtime.InteropServices.COMException ex)

{

//This is the exception that is thrown if the property does not exist

if (ex.ErrorCode == -1073676279)

{

lookupProperty = externalColumn.CustomPropertyCollection.New();

lookupProperty.Description = "When saving data, look for a row with this field, and if found, do an update instead of an insert.";

lookupProperty.Value = false;

lookupProperty.Name = LOOKUP_PROPERTY_NAME;

}

//Something unexpected happened

else

{

throw;

}

}

}

External metadata columns are not supposed to have editable properties. I do not completely understand your scenario. Why would you allow users of your component to be able to change this property?

Could you possibly put this property on an associated input column?

Thanks.

|||

It doesn't make sense in the input column, unfortunately. It's basically a way to create sort of a foreign key relationship to the destination, without actually creating a foreign key. When you save data to the destination, I want to check any columns in the destination that are marked as lookup columns, then if there are rows in the destination that match the value in the input buffer, I perform an update on those rows, otherwise I do an insert.

As a last resort, I was thinking that it may be possible to create another input to the destination that contained a list of input columns. Using variables may be another way to do this.

It would be cool if I could create a multi-choice variable at design time from the destination, but I don't think that is possible, so I may must use a semi-colon delimited list.

Eventually, I may need to do some custom UI to make this all easier, I suppose

|||

I see now why you need to edit external columns. You may want to submit request for this feature on the product feedback site or in the Kirk's thread on top of this forum.

For now, I would rather have a single custom property on the single input with delimited list of input columns than play with two inputs. The second input might bring you some additional headache.

Thanks.

|||

This is exactly what i needed too... I need to map an external input and a inside input that comes from an inside especified connection and table...

It's really important for me to have this done... If anyone have any idea how to add a custom input based not on a outside path but from an inside connection that would be great... using that i would be able to virtually map the lookup columns...

Best Regards,

How to edit a custom property on an external metadata column

I am using external metadata columns in a destination data component to match sharepoint fields to input columns. I want to add a flag that the user can set to specify if a column is a lookup column (indicates that the component should look for a list item with the specified input column value, and do an update if the item already exists). I added a custom boolean property to the medata column, but the property editor does not allow me to edit the column. It appears to be enabled, but when I choose a value other than the default, the editor immediately replaces the value I chose with the default.

How do I set the property so that it is editable in the property editor? Here is the code that I am using to create the property:

private void AddLookupProperty(IDTSExternalMetadataColumn90 externalColumn)

{

IDTSCustomProperty90 lookupProperty = null;

try

{

//Check to see if the property exists. If it does, don't do anything. If it doesn't, an exception will be thrown

lookupProperty = externalColumn.CustomPropertyCollection[LOOKUP_PROPERTY_NAME];

}

catch (System.Runtime.InteropServices.COMException ex)

{

//This is the exception that is thrown if the property does not exist

if (ex.ErrorCode == -1073676279)

{

lookupProperty = externalColumn.CustomPropertyCollection.New();

lookupProperty.Description = "When saving data, look for a row with this field, and if found, do an update instead of an insert.";

lookupProperty.Value = false;

lookupProperty.Name = LOOKUP_PROPERTY_NAME;

}

//Something unexpected happened

else

{

throw;

}

}

}

External metadata columns are not supposed to have editable properties. I do not completely understand your scenario. Why would you allow users of your component to be able to change this property?

Could you possibly put this property on an associated input column?

Thanks.

|||

It doesn't make sense in the input column, unfortunately. It's basically a way to create sort of a foreign key relationship to the destination, without actually creating a foreign key. When you save data to the destination, I want to check any columns in the destination that are marked as lookup columns, then if there are rows in the destination that match the value in the input buffer, I perform an update on those rows, otherwise I do an insert.

As a last resort, I was thinking that it may be possible to create another input to the destination that contained a list of input columns. Using variables may be another way to do this.

It would be cool if I could create a multi-choice variable at design time from the destination, but I don't think that is possible, so I may must use a semi-colon delimited list.

Eventually, I may need to do some custom UI to make this all easier, I suppose

|||

I see now why you need to edit external columns. You may want to submit request for this feature on the product feedback site or in the Kirk's thread on top of this forum.

For now, I would rather have a single custom property on the single input with delimited list of input columns than play with two inputs. The second input might bring you some additional headache.

Thanks.

|||

This is exactly what i needed too... I need to map an external input and a inside input that comes from an inside especified connection and table...

It's really important for me to have this done... If anyone have any idea how to add a custom input based not on a outside path but from an inside connection that would be great... using that i would be able to virtually map the lookup columns...

Best Regards,

Friday, February 24, 2012

How to do sizing on Memory requirement of SQL Server 2000 ?

Hi All,
We have custom application running on SQL Server 2000, about 100
users, on WIn Server 2003. The RAM installed is 1GB, very often that
the server the client getting kicked when trying to connect to the
server from custom app. Then we add to 2GB, now its getting better.
SO, I need a formula about how to determine the memory requirement of
our SQL Server 2000 on Windows Server 2003 ?
Thank you for your info,
xtantokrislioe@.gmail.com wrote:
> Hi All,
> We have custom application running on SQL Server 2000, about 100
> users, on WIn Server 2003. The RAM installed is 1GB, very often that
> the server the client getting kicked when trying to connect to the
> server from custom app. Then we add to 2GB, now its getting better.
> SO, I need a formula about how to determine the memory requirement of
> our SQL Server 2000 on Windows Server 2003 ?
> Thank you for your info,
> xtanto
You get an error when trying to connect for the first time?
I would start by addressing your connection timeout in the application
and if you are using 1GB-2GB of RAM look at the design of your database
and make sure you have good indexes. If you need to do table scans and
load everything into memory every time you do a select you will be in
trouble RAM and CPU wise.|||Marc S wrote:
> krislioe@.gmail.com wrote:
>
> You get an error when trying to connect for the first time?
> I would start by addressing your connection timeout in the application
> and if you are using 1GB-2GB of RAM look at the design of your database
> and make sure you have good indexes. If you need to do table scans and
> load everything into memory every time you do a select you will be in
> trouble RAM and CPU wise.
Looking at the design will help. But you should run performance
monitor. One thing you could do is look at Buffer Cache and Cache hit
ratios. If they are not adequate, then you could have poor written
queries and missing or improper indexes. Possible unnecessary
voluminous pages could be filling up the Buffer Cache causing it to
flush necessary pages. Then run profiler to identify processes and sql
statements unless you have a good idea what this could already be. What
I'm getting at here is there is no formula. Environments differ. That's
why real-world multi-user database applications typically need real
DBAs. Also, what I've stated above is not all you can look at. I would
do a google search on SQL Memory and start reading. Sorry there is no
easy formula.
Good Luck!!!|||Under SQL 2000 the most SQL will be able to see is 2 Gigs when running on
Win 2003 Standard. On Windows 2003 Enterprise Edition it can see more (3
Gigs with the /3 Gig switch, and the data cache can access more memory with
AWE enabled).
SQL will utilize all available memory for its caches.
There is no formula to predict how much memory your load will require as
there are many variables.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
<krislioe@.gmail.com> wrote in message
news:1157559010.101762.108420@.e3g2000cwe.googlegroups.com...
> Hi All,
> We have custom application running on SQL Server 2000, about 100
> users, on WIn Server 2003. The RAM installed is 1GB, very often that
> the server the client getting kicked when trying to connect to the
> server from custom app. Then we add to 2GB, now its getting better.
> SO, I need a formula about how to determine the memory requirement of
> our SQL Server 2000 on Windows Server 2003 ?
> Thank you for your info,
> xtanto
>|||Hi Hillary,
is there any official URLS / docs about this limitation ?
Thank you,
xtanto
Hilary Cotter menuliskan:[vbcol=seagreen]
> Under SQL 2000 the most SQL will be able to see is 2 Gigs when running on
> Win 2003 Standard. On Windows 2003 Enterprise Edition it can see more (3
> Gigs with the /3 Gig switch, and the data cache can access more memory wit
h
> AWE enabled).
> SQL will utilize all available memory for its caches.
> There is no formula to predict how much memory your load will require as
> there are many variables.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> <krislioe@.gmail.com> wrote in message
> news:1157559010.101762.108420@.e3g2000cwe.googlegroups.com...

How to do sizing on Memory requirement of SQL Server 2000 ?

Hi All,
We have custom application running on SQL Server 2000, about 100
users, on WIn Server 2003. The RAM installed is 1GB, very often that
the server the client getting kicked when trying to connect to the
server from custom app. Then we add to 2GB, now its getting better.
SO, I need a formula about how to determine the memory requirement of
our SQL Server 2000 on Windows Server 2003 ?
Thank you for your info,
xtantokrislioe@.gmail.com wrote:
> Hi All,
> We have custom application running on SQL Server 2000, about 100
> users, on WIn Server 2003. The RAM installed is 1GB, very often that
> the server the client getting kicked when trying to connect to the
> server from custom app. Then we add to 2GB, now its getting better.
> SO, I need a formula about how to determine the memory requirement of
> our SQL Server 2000 on Windows Server 2003 ?
> Thank you for your info,
> xtanto
You get an error when trying to connect for the first time?
I would start by addressing your connection timeout in the application
and if you are using 1GB-2GB of RAM look at the design of your database
and make sure you have good indexes. If you need to do table scans and
load everything into memory every time you do a select you will be in
trouble RAM and CPU wise.|||Marc S wrote:
> krislioe@.gmail.com wrote:
> > Hi All,
> >
> > We have custom application running on SQL Server 2000, about 100
> > users, on WIn Server 2003. The RAM installed is 1GB, very often that
> > the server the client getting kicked when trying to connect to the
> > server from custom app. Then we add to 2GB, now its getting better.
> >
> > SO, I need a formula about how to determine the memory requirement of
> > our SQL Server 2000 on Windows Server 2003 ?
> >
> > Thank you for your info,
> > xtanto
>
> You get an error when trying to connect for the first time?
> I would start by addressing your connection timeout in the application
> and if you are using 1GB-2GB of RAM look at the design of your database
> and make sure you have good indexes. If you need to do table scans and
> load everything into memory every time you do a select you will be in
> trouble RAM and CPU wise.
Looking at the design will help. But you should run performance
monitor. One thing you could do is look at Buffer Cache and Cache hit
ratios. If they are not adequate, then you could have poor written
queries and missing or improper indexes. Possible unnecessary
voluminous pages could be filling up the Buffer Cache causing it to
flush necessary pages. Then run profiler to identify processes and sql
statements unless you have a good idea what this could already be. What
I'm getting at here is there is no formula. Environments differ. That's
why real-world multi-user database applications typically need real
DBAs. Also, what I've stated above is not all you can look at. I would
do a google search on SQL Memory and start reading. Sorry there is no
easy formula.
Good Luck!!!|||Under SQL 2000 the most SQL will be able to see is 2 Gigs when running on
Win 2003 Standard. On Windows 2003 Enterprise Edition it can see more (3
Gigs with the /3 Gig switch, and the data cache can access more memory with
AWE enabled).
SQL will utilize all available memory for its caches.
There is no formula to predict how much memory your load will require as
there are many variables.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
<krislioe@.gmail.com> wrote in message
news:1157559010.101762.108420@.e3g2000cwe.googlegroups.com...
> Hi All,
> We have custom application running on SQL Server 2000, about 100
> users, on WIn Server 2003. The RAM installed is 1GB, very often that
> the server the client getting kicked when trying to connect to the
> server from custom app. Then we add to 2GB, now its getting better.
> SO, I need a formula about how to determine the memory requirement of
> our SQL Server 2000 on Windows Server 2003 ?
> Thank you for your info,
> xtanto
>|||Hi Hillary,
is there any official URLS / docs about this limitation ?
Thank you,
xtanto
Hilary Cotter menuliskan:
> Under SQL 2000 the most SQL will be able to see is 2 Gigs when running on
> Win 2003 Standard. On Windows 2003 Enterprise Edition it can see more (3
> Gigs with the /3 Gig switch, and the data cache can access more memory with
> AWE enabled).
> SQL will utilize all available memory for its caches.
> There is no formula to predict how much memory your load will require as
> there are many variables.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> <krislioe@.gmail.com> wrote in message
> news:1157559010.101762.108420@.e3g2000cwe.googlegroups.com...
> > Hi All,
> >
> > We have custom application running on SQL Server 2000, about 100
> > users, on WIn Server 2003. The RAM installed is 1GB, very often that
> > the server the client getting kicked when trying to connect to the
> > server from custom app. Then we add to 2GB, now its getting better.
> >
> > SO, I need a formula about how to determine the memory requirement of
> > our SQL Server 2000 on Windows Server 2003 ?
> >
> > Thank you for your info,
> > xtanto
> >