Friday, April 10, 2009
ORA-06502: PL/SQL: numeric or value error
The context of the problem occurs when I did run it on a WinXP pro sp3+ workstation which had installed the latest ODP.NET. However its quite extraordinary to see it was not reproduced in a machine installed Oracle Express Edition 11g (without oracle client).
Later, I understood that this problems occurs if you have a VarChar2 parameter(s) when executing a Oracle Stored Procedure. So people advised to have the size and Parameter direction in the parameter. I incresed the size everytime of the parameter and had the parameter direction as "input", yet this error kept bugging me. (My stored procedures did not have any return/output parameters, so I'm not in a possition to comment its behavior).
Finally after googling for days and finding one post in the Oracle forum from one guy who said to use the direction as "InputOutput" did the work for me. Furthermore to the parameter direction, I also gave all of the VarChar2 parameter size as 2000.
Produced Environment: .NET framework 2.0, Win XP Pro sp3 and the latest ODP.NET
Monday, September 01, 2008
Motivation
When the road you're trudging seems uphil,
When the funds are low, and debts are higher,
And you want to smile but you have to sigh,
When care is pressing you down a bit,
Rest if you must, but dont quit!
--
Hifni Shahzard Nazeer M. AMBCS
Blog: http://hifni.blogspot.com | Web: http://hifni.shahzard.googlepages.com
"The higher we soar, the smaller we appear to those who cannot fly" - Friedrich Nietzsche
Wednesday, August 20, 2008
Solutions: Visual Studio.NET 2003 Debugging Errors
- Run the aspnet_regiis.exe via the Visual Studio.NET 2003 Command Prompt ( - Start Menu > Microsoft Visual Studio.NET 2003 > Visual Studio.NET Tools > Visual Studio 2003 Command Prompt - ) to register asp.net into IIS. The aspnet_regiis.exe is availabe in C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322. This scenario should be applied when you re-install either IIS or Visual Studio.NET 2003
- Also check the <processModel> tag of your machine.config, check the value of <userName> attribute. It could be machine, if so change it to system. Finally restart IIS and retry. Source: http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_21547213.html
Further Reference:
http://msdn.microsoft.com/en-us/library/h35f56yz(VS.71).aspx
http://msdn.microsoft.com/en-us/library/dwesw3ee(VS.71).aspx
Monday, June 16, 2008
Thursday, May 24, 2007
Getting Percentage from SQL Queries
Lets Assume that We need to show all Customer's Total Order Value from Northwind.mdb. For that I used the following Query:
SELECT
Customers.CompanyName,
Sum([UnitPrice]*[Quantity]) AS CustTotal,
FROM
(Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID) INNER JOIN [Order Details] ON Orders.OrderID = [Order Details].OrderID
GROUP BY Customers.CompanyName, Orders.CustomerID
ORDER BY Sum([UnitPrice]*[Quantity]) DESC;
I figured that to get the percentage i need to use the following simple formula:
Percentage = [Client Total]/[Overall Total] * 100;
So to get the percentage I added the following SQL which is a translation of the above formula:
(
((Sum([UnitPrice]*[Quantity])/(SELECT SUM([UnitPrice]*[Quantity]) FROM [Order Details]))*100)
) AS Percentage
So the Overall SQL looks something as after add:
SELECT
Customers.CompanyName,
Sum([UnitPrice]*[Quantity]) AS CustTotal,
(
((Sum([UnitPrice]*[Quantity])/(SELECT SUM( [UnitPrice]*[Quantity]) FROM [Order Details]))*100)
) AS Percentage
FROM
(Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID) INNER JOIN [Order Details] ON Orders.OrderID = [Order Details].OrderID
GROUP BY Customers.CompanyName, Orders.CustomerID
ORDER BY Sum([UnitPrice]*[Quantity]) DESC;
PLEASE! if you found this interesting, do drop me a comment!
Thursday, December 14, 2006
MSDE 2000 Issues
You get MSDE in your Office CD free. I had Microsoft Office XP with me and this is the way I installed it.
Insert your Office CD in, and type the following in your Command Prompt:
C:\>D:\MSDE2000\Setup.Exe SAPWD="
And to Attach a Database to MSDE, I used the following way:
Again nothing will help you instead of Command Prompt.
Here, first you have to login to MSDE, and this is the way its done (provide your SA password):
C:\>osql/U sa/P
Once logged in, type the following in the command prompt:
EXEC sp_attach_db @dbname='pubs' @filename1='C:\Program Files\Microsoft Sql Server\MSSQL\Data\pubs.mdf' @filename2=''C:\Program Files\Microsoft Sql Server\MSSQL\Data\pubs_log.ldf' GO
Its arent easy with out a proper GUI, yet I was able to surf the internet and get help.
Wednesday, November 01, 2006
Do you really know how to forward e-mails? 50% of us do; 50% DO NOT
LETTER TO Everybody : Do you really know how to forward e-mails? 50% of us do; 50% DO NOT.
Do you wonder why you get viruses or junk mail? Do you hate it? Every time you forward an e-mail there is information left over from the people who got the message before you, namely their e-mail addresses & names. As the messages get forwarded along, the list of addresses builds, and builds, and builds, and all it takes is for some poor sap to get a virus, and his or her computer can send that virus to every E-mail address that has come across his computer. Or, someone can take all of those addresses and sell them or send junk mail to them in the hopes that you will go to the site and he will make five cents for each hit. That's right, all of that inconvenience over a nickel! How do you stop it? Well, there are several easy steps:
(1) When you forward an e-mail, DELETE all of the other addresses that appear in the body of the message (at the top). That's right, DELETE them. Highlight them and delete them, backspace them, cut them, whatever it is you know how to do. It only takes a second. You MUST click the "Forward" button first and then you will have full editing capabilities against the body and headers of the message. If you don't click on "Forward" first, you won't be able to edit the message at all.
(2) Whenever you send an e-mail to more than one person, do NOT use the To: or Cc: fields for adding e-mail addresses. Always use the BCC:(blind carbon copy) field for listing the e-mail addresses. This way the people you send to will only see their own e-mail address. If you don't see your BCC: option click on where it says To: and your address list will appear. Highlight the address and choose BCC: and that's it, it's that easy. When you send to BCC: your message will automatically say "Undisclosed Recipients" in the "TO:" field of the people who receive it. If that phrase does not appear, type your own email address in the "TO" field, but put everyone else's in the BCC field.
(3) Remove any "FW :" in the subject line. You can re-name the subject if you wish or even fix spelling.
Ever get those e-mails that you have to open 10 pages to read the one page with the information on it? By Forwarding from the actual page you wish someone to view, you stop them from having to open many e-mails just to see what you sent. (AMEN!) If you can't forward from that page, "Copy" the info and then open a new email blank page and "Paste".
(5) Have you ever gotten an email that is a petition? It states a position and asks you to add your name and address and to forward it to 10 or 15 people or your entire address book. The email can be forwarded on and on and can collect thousands of names and email addresses.
A FACT:
The completed petition is actually worth a couple of bucks to a professional spammer because of the wealth of valid names and email addresses contained therein. If you want to support the petition, send it as your own personal letter to the intended recipient. Your position may carry more weight as a personal letter than a laundry list of names and email address on a petition. (Actually, if you think about it, who is supposed to send the petition in to whatever ca use it supports? And don't believe the ones that say that the email is being traced, it just ain't so!)
(6) One of the main ones I hate is the ones that say that something like, -Send this email to 10 people and you'll see something great run across your screen.-Or sometimes they just tease you by saying something really cute will happen. IT AINT GONNA HAPPEN!!!!! (Trust me, I'm still seeing some of the same ones that I waited on 10 years ago!) I don't let the bad luck ones scare me either, they get trashed. (could be why I haven't won the lottery) Before you forward an Amber Alert, or a Virus Alert, or some of the other ones floating around nowadays, check them out before you forward them. Most of them are junk mail that have been circling the net for YEARS! Just about everything you receive in an email that is in question can be checked out a Snopes. Just go to http://www.snopes.com/. It is really easy to find out if it is real or not. If it is not, please don't pass it on. So please, in the future, let's stop the junk mail and the viruses.
Finally, here's an idea!!! Let's send this to everyone we know (but strip my address off first, please). This is something that SHOULD be forwarded. Amen! Now I have one pet peeve. It is people who forward messages as attachments. This happens because your set up in Outlook Express is incorrect. Look in tools, options, tab send. There is a box labeled to "include message in reply. Make sure it is checked. This will stop the message becoming an attachment. Then do all the things recommended above. It only takes a little time. This message is being forwarded to you, you do not see who forwarded it to me, nor do you see any attachments. You also do not see who it is going to. This message is actually going to everyone in my email address book. Emails with attachments are suspect as soon as they hit my computer. If I do not know the name, the message is deleted good or bad.
Tuesday, October 17, 2006
Low Scoring Affairs, Boring Matches & Evil Pitches
Friday, September 29, 2006
Knowing whether you have QuickTime ActiveX installed or not
Wednesday, July 05, 2006
Thoughts...
Why is it so hard to tell the truth ...yet so easy to tell a lie,
why do we sleep in the church..but when the sermon is over we suddenly wake up?
why is it so hard to talk about God...but so easy to talk about sex?
why are we so bored to look at a Christmas magazine..but so easy to read a vibe magazine ?
why is it so easy to delete a godly offline messages ...yet we forward the nasty ones?
why are the churches getting smaller..but yet the bars and clubs are growing ??
think about it..
Just remember God is watching you in his list...
Wednesday, June 28, 2006
Use Transaction in MIDAS
1) create a remote data module , drop a query to select records from table A, drop a TUpdateSQL for the query, specify the SQL statement of Table A. Drop a TDatasetprovider hook to the query. Drop another query, then in its SQL property write the insert SQL statement to table B.
2) In the BeforeUpdateRecord event, I write this code:
SetParams(UpdateSQL1, DeltaDS, UpdateKind);
UpdateSQL1. ExecSQL(UpdateKind);
if UpdateKind = ukUpdate then begin
{ Insert a log to Table B}
// set the params
Query2.ExecSQL;
end;
Applied := True;
3) In the client, you should also make some change. When you try to save the changes, use ApplyUpdates(0) instead of ApplyUpdates(-1). For example:
ClientDataSet1.ApplyUpdates(0)
This is OK. Delphi does it well. If a error occur when you try to insert a log to Table B, the transaction will rollback, then you can find that Table A's record is not changed at all.
I have tested it at Delphi 4, It also works very well.
Good Luck.
Monday, June 26, 2006
Creating GUIDs In Delphi
must add the ActiveX unit to your uses clause.
<Code>
procedure TForm1.Button2Click(Sender: TObject);
var
G: TGuid;
begin
CoCreateGuid(G);
end;
<\Code>
--
Bill
Bill Todd (TeamB)
(TeamB cannot respond to questions received via email)
Source:
Click here
Friday, June 23, 2006
Da Predator
This is one of the coolest pics I found in the internet:

What inspired me about the "Predator" is his armoury, gadgets and his body kit. Wish I had those! The movie "Predator-1" and "Predator-2" does highlight him as the bad guy who brutually kills all bad guys. However in the movie: "AVP" his role remains more similar to the earlier movies, but later companions a human to demolish the rising alien dominancy.
Wednesday, June 21, 2006
Delphi Ruined him
development tools out there. Every time I try, I get frustrated, and I
give up. Partly I think it's because my brain has locked into Delphi
mode so tightly that I can't think of anything else. Partly it's
because Delphi has spoiled me rotten, and I'm absolutely floored by the
stuff that I have to deal with when I try to use any other tool. Now
the reason I'm looking around for a new development tool to learn, is so
I can have a tool for writing cross-platform code, hopefully that will
work on Windows, Mac, and Linux.
Has anyone else been in this spot, and had a look around? What did you
do? Did you plan to have an affair with another language, and then come
home happily to Delphi, knowing it would still have you back again?
- I tried Java again recently. I was really impressed by NetBeans and
the new "matisse" GUI builder. I am not at all impressed by Eclipse,
although I like the SWT framework the gui-builders for Eclipse that are
any good are quite expensive, and I don't feel like paying $$$ just to
play around and learn the new tool.
- I tried a few Smalltalks, because as we all know, Smalltalk should
have been a really important and powerful programming languages, but for
some reason, it never achieved success. There's Dolphin, for which a
free version exists, and there's Squeak, which is entirely free. Both
are really interesting to play with, but I must admit my brain is so
wired for the procedural style of coding that I can't bear to write a
for-loop in Smalltalk, or send messages between integers. It just seems
weird and wrong to me. And closures and stuff. And I think that at
this point, learning Smalltalk is about as pointless as learning COBOL.
- I'd try a LISP, but I have no idea whether a LISP gui builder RAD tool
even exists. Perhaps LISP programmers can't be bothered to look up from
their latest EMACS macros-that-generate-macros-that-generate-LISP-code,
in order to consider the needs of the GUI-building population.
- I downloaded MS Visual C# express, but I don't like DotNet, and I'd
rather not learn another Windows-only tool. Delphi does fine for
Windows. I'd really like to learn something that gets me free from
Windows completely. Maybe DotNet is the way to go, and I should learn
to love C#, and hope that MONO achieves maturity.
- I really like Python, but every single python gui framework seems too
full of accidental complexity, or too ugly, or both. Tcl/Tk is ugly.
wxWindows is really hard to learn. QT is licensed in a way that makes
using it on Windows cost a lot of money. BOA constructor is a neat toy,
but I haven't been able to do anything useful with it yet.
- For confirmed delphi bigots, such as myself, perhaps Lazarus is the
right way to cross-platform myself, but as much progress as Lazarus has
made, it's still not ready for prime time; it lacks packages, and the
LCL/FCL components/code-libraries are rather klunky and limited in
features when compared with the VCL.
So what did YOU do last time you felt like trying another developer
tool? Can you find it in your heart to say anything good about any other
development tool? Or are you a crabby old Delphi guy like me, dyed in
the wool, and unlikely ever to repent?
Warren
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~End of Post~~~~~~~~~~~~~~~~~~~~~~~~~~`
For further reading the entire post, go to: http://delphi.newswhat.com/geoxml/forumgetthread?groupname=borland.public.delphi.non-technical&messageid=4484a839$1@newsgroups.borland.com&displaymode=all
Monday, June 12, 2006
Beginning of the end
Thursday, June 01, 2006
Being a Geek!
This is a great description I got from Patti's Blog about "GEEK":
Now, don't stress just yet. I know that the term "GEEK" has been used in the past as an insult or a stereo-type for losers. However, the term "GEEK" has taken on new meaning over the past few years.
A GEEK is anyone who takes pride in what they do... and is actually good at it. GEEK is not to be confused with the term "NERD". Nerds are the people who got wedgies in high school and then would run home crying. A GEEK is someone who got a wedgie in high school, then went home and crashed the "Wedgor's" computer... or would mix a concoction in chemistry class that would give the assailant severe diarrhea for a week.
A GEEK is someone you call when your computer breaks. GEEKS are the people you contact to help you build a web site or save a database. GEEKS run the computer network at your place of work. A GEEK can be found hosting a mass LAN party. GEEKS write programs that balance your checkbook, organize your files and store/retrieve information... and restarts your computer more often so that you don't have to. A GEEK is someone you call when you have any kind of technological question. GEEKS are respected by others and are in high demand. GEEKS know what they are doing. Nerds are clueless little imps that can't tell the difference between Barney the purple dinosaur and Tux the (LINUX) penguin.
GEEK is a rockin' term, and to be a GEEK is a far greater compliment than any other. Because being a GEEK does not only mean you are good looking... but it also means that you are good at what you do.
All GEEKS should respect one another. These days, the geeks are having their revenge. Rich and successful geeks are everywhere, or at least they appear to be. There is even a Geek Pride Festival, a celebration of all things GEEK. That is why I'm rounding up all of the GEEK .. we need to stand up and shout it…
Source: http://www.geekgirldigest.com/Wednesday, May 24, 2006
UNP remains the power house in Colombo
To see the results pls follow this URL : http://www.news.lk/lg_election_2006/01A.html
Graham Thrope
England Tour of Sri Lanka 2001/02.
On last Sunday, I had the opportunity to watch Sanjay Manjerkar’s Modern Masters show, where they featured two great cricket players of England. Among them was Graham Thorpe. He was one of my favorites. The programme showed some highlights of the England Tour to the Caribbean and South Africa. This reminded me about the innings he played in Sri Lanka on the Tour in 2001. He was at his peak in this series. This series sparkled some controversy over the umpires decision made.

To give a brief summary, England was completely outplayed in the 1st Test played at Galle. The main reason behind this was the inability to cope the turning ball of Muralitharan and swing of Vaas. There feet weren’t moving well and more often you can see them stuck in the crease and was waiting for the ball to come to them. Non of the Englishmen fared well but one stood up and it was non other than the “New Kid on the Block”: Marcus Trescothick with a 119 in the First Test.
Then came the 2nd Test in Kandy. It was bright and sunny day and thankfully there weren’t any interruption from Mother Nature. The environment looked some what ideal to the Englishmen. This match saw the emergence of Graham Thorpe’s form as he scored 54 & 46. Overall, the Englishmen’s feet were moving well and they did cope the spin and swing quite well which resulted in a much wanted win and squared the series, in fact they did it with some difficulty.

Finally it was upto the 3rd Test decide the winner of the series. Sri Lanka batted first, and made 241 with Mahela Jayawardena scoring a worth wile 71. England batted in their 1st innings and were in trouble from the word “GO”. They ended up scoring 249 with Graham Thrope leading the way with an unbeaten 113 out of it and almost scoring half of team’s runs. It was great to see him in total control and handled the spin and swing very well. He cutted, reverse sweept, and the most best of all his pull which was memorable to watch. He was in control and for the first time Murali and Vaas went out of ideas. Sri Lanka’s misery continued in their 2nd innings as they went down with out a fight for a mere 81 runs. It was a disappointing effort from the Sri Lankans, Which gave the Englishmen to score a mere 74 of 25 Overs runs to wrap-up the series. England Startted yet again with trouble loosing quick wickets at regular intervals and this time it was Sanath Jayasuriya with his part time left arm spin which gave a horrible time to the englishment. It was upto Graham Thrope again and he did it with scoring an unbeten 32.
Wednesday, April 19, 2006
A better World in my view
America rubs salt in our wounds!
Earlier they were after Iraq for WMD (which they didn’t find a single trace), now they are after Iran for the same reason. The consequences are mass amount of human deaths and higher fuel prices and many more. They are a problem, if not a nuisance for the world society. The consequences of a probable war wouldn’t affect them, but would affect the other nations in a big way, particularly the poor nations.
They said they will bring peace, but has bought the opposite. They said they will rebuild, but how can they repay the lost lives? Every effort they took was in vain. So far how many lives have lost, how many children have been orphaned? Everyday I hear that at least 10 people die in Iraq and Afghanistan. I guess America’s policy is some what like Dictatorship and Invasion of other countries. I think the era of colonialism is going to be back, we may see countries invading other countries. The same as we learned in our History books. They are teaching a very bad example for the world. This is the worst side of it.
Fuel Prices up means that Cost of living is going up. Yesterday the SL Government announced a Rs. 8 hike on fuel prices. This means public transport fares are likely to go up in due course. Further, Gas Prices, and fast food items may see a hike as well. We are getting a low income, and with that there haven’t been a single savings. Now this turn will further worsen our lives.
Sanctions: Do we see a positive result out of it?
The UN and particularly the Americans are always on the sanctions. If any countries doesn’t either obey or follow the UN order, then tighten your seat belts coz sanctions are nearby. They don’t see what’s coming out of it and who suffers the most of it? It won’t affect a political leader of that country nor its government, but those who will be suffering would be the people themselves. No medicines! No Food! Professionals migrate to other countries to seek asylum leaving hardly anyone to look up after their country.
Voting for the same government consequently: the worse side
In my point of view most of politician is not a good guy. Most of them (very few) are culprits! Always money hunger and self- concerned people rather than their own country. What’s my suggestions to all of you is don’t elect a party that have won earlier, instead vote for another party. By this, the culprits won’t get a long period to do the culprit works. Always insist on a change. At least their culprit’s works is limited.