Decode function in Oracle

Hi,

Oracle provides a great function just like switch statement in C#. Net lets brief it by considering a table has name Servers which has columns as server ID, server name, hub, description, created and modified dates.

Sample data of this tables is as follows.

Decode query is

Select decode(Sr. Hub, ‘Aus’, ‘Australia ‘,’ Default ‘),

Decode(Sr.Hub,’EU’,’Europe’) from servers.

This query gives me data as Australia for only record which have hub value as Aus and default for mismatched columns. Also returns null for hub which doesn’t match with hub value as Eu but returns as European to the matched column value.

Advertisements

Wcf service responds as provided URI scheme https is invalid.

Hi

When your wcf service throws error from service as ‘The provided URI scheme https is invalid;expected http‘.

Dont panic it is just a configuration change where you can do it in app. Config or in web. Config as applicable.

Just find out binding attribute in which security tag should have mode =none which must be changed to mode=transport to get rid of this error response.

Which could looks as:

<security mode=”Transport”>

That’s it for a day.

Unable to start debugging on the web server.

Most times we observe the error while debugging with visual studio. Error dialog box says:

Unable to start debugging on the web server. The iis worker process for the launched URL is not currently running.

There are multiple work around available but which works me is as follows :

Open IIS manager click authentication – > enable Windows Authentication.

Restart IIS and now start visual studio open solution and start debugging your application.

One last step if still issue continues is try changing your application pool.

Invalid parameter binding

You may encounter this error when you provide parameter/parameters type in your application data access files mismatch with the actual parameter/parameters type of database procedure.

For example, there is a parameter name model in data access file with type raw which is actually varchar type in database procedure.

Hence encountered invalid parameter binding which can be corrected when

changing type from raw to string in data access file.

That’s all for the day.

Resolved: … is not allowed here because it does not extend class “System. Web. UI. Page”

Whenever you see such error while building websites, web applications or migration from previous versions to higher where mostly encounters.

Don’t panic it is pretty simple but needs attention.

The issue is only in one line of code where you find page directive.

To be more specific I mostly observe this error encountered because of inherits attribute of page directive tag of markup page.

For an instance, adding a aspx page to existing project having multiple directories like registration, sales, services, logs, geographies.

I need to add aspx page to geographies directory of web project. To do it I just right click on geographies directory and click add new item then give name to it and save.

Before you start execution have a look on page directive where you may find improper directive, may be as below:

<%language =vb code behind = page name. Aspx. Vb inherits =forex. Webapp. Pagename. Aspx%>

And this causes error as mentioned in title of post. To get rid of it, it is needed to verify the line as below

<%language =vb code behind = page name. Aspx. Vb inherits =forex. Webapp. Geographies. Pagename. Aspx%>

Hope it may be useful to other geeks.

Applying Styles to SSRS 1

Hi..

As you have seen in last post that report footer displays date time as per the system in simple format. Lets try to modify it as per our requirement. My requirement is to display it in Day, date month year eg: Sunday, 16 July 2017. To achieve it follow below steps:

  1. Go to Properties of textbox in footer, Provide the value as shown in expression.ssrs5
  2. Then click ok, set the properties of text box with tab name as Number and select the format as per requirement as shown below:ssrs5_1
  3. Click ok, the preview the report and find the report footer as expected.SSRS5_2

That’s it for the day..

SSRS Formatting : Line Height

Hi..

I was working on SSRS reports where one of my reports have multiple text boxes with lot of texts inside. It was working fine when I was testing locally but when deployed on reports server few text boxes show text in 1 pt where as I set its font size to some value like 12 pt. After deployment, I reopened the same report in my local system and verified the properties and found that Line Height property of text box was set and hence its text was displayed in 1 pt only. It works fine locally but identified only on report server. The image of the property of Line height is shown as:

ssrs4

Do not set any value to this property which works well.

Thanks.