Monday, July 28, 2008

.NET talk: Visual Basic VS Visual Basic.NET

This is quite and old topic but you lose nothing for reading it. Since this due to my understanding based on my working experieance and some readings, I always welcome any response, whether to add or to correct the facts.

**************************************************************************************

Quite a number of friends keep asking me what are the differences between VB and VB.NET especially those who have some experiences on using Visual Basic. (VB6 or lower).

In this posting, I'll just focus on ONE difference.


Visual Basic is compiled language while Visual Basic.NET is interpreted language

Okay, if you first time heard "interpreted language" or "compiled language" maybe you want to read this. Briefly speaking, interpreted language is referred to the programming language which is interpreted line by line during runtime by an interpreter. Some other interpreted language which is very common today are PHP, PERL, JAVA and so on.

On the other hand, compiled language is a programming which is initially compiled to a native code also called machine code and object code. This program will later be run by the CPU directly without any further interpretation, C and C++ fall in this group. Some peaple might not really agree if I said VB.Net is interpreted instead of compiled. This reason might due to the fact that VB.Net itself actually compiled before executed (remember build and rebuild button in Visual Studio). You are correct - but the code is compiled to some intermediate code which microsoft call it CIL (stands for Common Intermediate Language, initially being called MSIL - stands for Microsoft Intermediate Language). This CIL works as similar as bytecodes for JAVA. Once, the code has been transferred to CIL. It will be later executed by Just In Time interpreter. That's one of two reason why before you can run any .NET application, it is a MUST to pre-install .NET Framework.

Now back to Visual Basic, after compiling the code to EXE, do you need to further install any translator? I don't think so (Please correct me if I'm wrong).

Next post, I'll talk about why VB.Net is running as interpreted instead of compiled.

Sunday, July 27, 2008

Troubleshooting: [CrystalReport + ASP.NET]: Cannot deploy Crystal Report with ASP.NET in target machine

Building report using Crystal Report in ASP.NET website is quite straight forward. Maybe you would do these steps:
1 - Add new Crystal Report page
2 - Specify the data source of the report in Crystal Report page
3 - Drag and drop Crystal Viewer on the web page.
4 - Specify the report source
5 - Put a few line of code if needed.
6 - Run the program from Visual Studio 2005, and there your ASP.Net report come out.

These are the steps you see working in the development machine. Now, copy the webpage files to your target machine (any server without Visual Studio 2005 installed). Run it in the localhost. Can you see similar thing happen again OR another new mystery to be figured out? If the latter you see, then keep on reading...

ENVIRONMENT
=============
VS 2005
Crystal Report for VS 2005
ASP.NET 2.0
Win XP Service Pack 2


SYMPTONS
==========
1 - When open browser you've an error message " Could not load file or Assembly "CrystalDecisions.****" (The message is vary based one what kind of CrystalDecision DLL or Assembly files is missing)

REASON
=======
Some DLL or Assembly files are missing. Normally DLL files should appear under application root folder name "Bin" while the assembly must appear
in C:\WINDOWS\Assembly\

SOLUTION
=========
step 1) Copy DLL files to Bin folder.

crystaldecisions.crystalreports.engine.dll.
crystaldecisions.reportsource.dll
crystaldecisions.shared.dll
crystaldecisions.web.dll

COPY above DLL from "C:\Program Files\Common Files\Business Objects\2.7\Managed\" and PASTE them to "Visual Studio 2005\WebSites\[YourWebsiteName]\Bin\" (this path might vary depend on your initial chosen path)

Once, you've done this, you might have probably able to browse your website up to the page where the crystalreport document appears, here you'll face another problem saying

"Could not load file or assembly CrystalDecisions.ReportAppserver.*** ..."

This problem is caused by MISSING ASSEMBLY FILES which is located inside c:\windows\assembly\.

for details instruction, go to step 2.

==================================================

step 2) Install CrystalReports Assembly files

a) for 64-bit server:
COPY installation program called "CRRedist2005_x64.msi" from "C:\Program Files\Microsoft Visual Studio 8\Crystal Reports\CRRedist\X64" from development machine and paste into target machine. Then, double click on it to start the installation.

b)for 32-bit server
Donwload CRRedist2005_x86.msi from http://www.filewatcher.com/m/CRRedist2005_x86.msi.16971776.0.0.html
After download, double click on it to start the installation.

Once the installation process completed. Browse your website. Here you will be able to view the page with crystal report. You may need to restart the server or IIS if the problem still persist.

==================================================

InsyaAllah, this solution will work seamlessly!

Troubleshoot: [CrystalReport .NET] Database Logon Dialog Keep On Apppearing

For those who are heavily involved with CrystalReport especially CrystalReport .NET version might notice some 'unwanted' things happen sometimes after deployment of a project. I involve a lot on VB.NET programming which used CrystalReport as its reporting services and one of the regular thing I face was a problem in which Database Logon dialog keep on appear itself asking you to enter username, password, server, etc. However, this dialog keep coming out even after you fill in the required field. In most cases, this problem does occur in certain machine only.

After trying and trying few ways (and this is always the way you'll finally solve the prob), finally I come to this solution and maybe conclusion. I couldn't guarantee this solution may apply to all. But maybe for those having similar trouble, can put this on try...

ENVIRONMENT
============
VS .NET 2003
Crystal Report for .NET 2003
Win XP Service Pack 2

SYMPTONS
==========
generate a report, suddenly "Database Login" dialog appear, whatever things you write on (server, username, pwd, etc)you'll still get this error message.


REASON
=======
Absoulue reason of this problem is still unknows, but one of the reason is bacause dll file used to read XML Schema (*.xsd) is corrupted or unable to do intented job.

SOLUTION
=========
Easiest way is by copying the whole files from folder "C:\Program Files\Common Files\CrystalDecision\1.0\bin" FROM (PC which doesn't have this problem) TO the same location at the 'problem' PC.

If GOD permits, everything works fine later!

Friday, July 25, 2008

XP Fans won't migrate to Vista



It's just yesterday when I wondered if I've ability to develop my own operating system which can work perfectly with all other software and hardware drivers just like Windows XP does. This hard-to-achieve dream(still can achieve I believe) was actually triggered by the few months back bad news regarding possibilities that Microsoft will stop supporting Windows XP after somewhere on 2009.

Less than 24 hours later I found that there one open source team on the net has just launched their alpha version of 'WinXP'-like OS called ReactOS.

Claiming that their XP-version is just similar with the existing Microsoft Windows XP on the market. It's gonna work just like the WinXP and sure it's not another LINUX Windows GUI distro as claimed by them "This is not a Linux based system, and shares none of the unix architecture"

Okay, this could be another good news collection to all XP users a.k.a Vista haters after June news.


p/s - Looks like most XP-users is buying time for at least until Windows 7 is launced.

AJAX, CSS and Learning Videos

Almost this whole week, I spent my time watching and listening to few series of ASP.NET AJAX videos provided by Microsoft ASP.NET team. Thanks to them for making my life alot easier these days. For those sharing similar interest can go to this site. Take your time to watch as much as videos you want. These would give you some idea on what AJAX can do and how it does the thing. Some people said this is another new technology. Actually not really. The idea and concept is quite old but has recently been commercialized once Microsoft added XMLHttpRequest to IE5. ASP.NET AJAX itself is one of the best example.

Enough talk about AJAX. Still long way to go. Hopefully I'll have chance to apply it in my coming project.

Considering myself as a newbie in Web Programming, I feel a bit left behind - actually already quite far behind :-), need to learn a lot of new things. Let alone talk about ASP family - AJAX, MVC, etc.

Talking about web, designing comes into play. Time is another thing. Now CSS gives me headache this whole day. Any videos I can see?

Thursday, July 24, 2008

Are you a programmer?

When I was an IT student, I once heard one of my friend (actually I heard this from quite a few of them) saying "I hate programming...". and everybody knows what he tried to say was he hate LEARNING programming. Full stop.

********

Okay, now let do a little bit analysis on why there so many people out there especially those who're taking IT course in University not really 'love' to do programming. Actually worse, since all these people don't have any interest to learn programming. There are few possibilities why, one of them should be the the one that I would like to call king of all the root cause which is the ATTITUDE.

Attitude that matter

This is not a rocket science to prove that how attitude has shape people's life. I don't want to talk about Covey's 7 habit or Ziglar's Over the top or whatever books - let simply see ourselves. What we are today is actually the result of our attitude we posses yesterday. Sorry, no more beautiful words, come back to the programming issues just now. That's the attitude that build barrier to all these people to start learning programming (even they've already sat for number of programming exams, unfortunately they actually yet to start learning the thing - or at least open their mind for learning it). Why this thing happen? Here comes quite number of arguments.
One of them is "I can't see the benefit of learning this!". Ermm...so why you take this IT course at the first place? Maybe we got this in reply (maybe this quite obselete but at least it was happening to me :-0 ) ".....I know IT is about doing something with computers, but.."...okay done! that's your attitude, you're doing something that would shape your future without any prior information so that you can do the thing in much strategic ways and better ways and most importantly right ways. So because of this fault, now you're spending 4 years into something you don't have interest in it. How expensive it cost! What I'm trying to say is some of the IT students take the couse without any prior information that they are going to learn programming. It's like a person who want to be carpenter but don't know that he's gonna use hammer and nail.

It's just a tool

Good news that programming languages are just a tool to create a system. Just like hammer and nail to build a house. But tool is important. Without them, nothing will be produced. Since they are tools. So we're always welcome to use them. Keep on using them will give you expertise on handling them.

What we've to do now is to identify the tool we're gonna use. Of course, know it function always comes first so that we won't accidentally use wrong tool which produce bad result end up blaming that tool. There were Cobol, Pascal, C, C++ at the old days (they're still useful today) and new generation of JAVA and .NET at the present. Their goal is always one - to provide right tool for the right product.

Sharing a hope

Welcome to all visitors,

This blog has been created on 25th July 2008, 12.14 AM. It is my purpose to make this blog as a mean to share my thoughts on any issues. Ooops...! did I say 'any'? Sorry NOT really, there must be certain issues I'll talk most and that'd be the reason why I initially started this blog :-)

I'm gonna talk much on something related to my work and OF COURSE the industry that i'm in. Finally, let me tell you, what motivate me most is indeed the response which I'm gonna get from you guys!

By then, lets the learning and sharing begin..

Bye.