Skip to main content

Posts

Showing posts from 2008

MySQL Stored Procedure Error

In our project we had many many stored procedures and many parameters passes to those sps. But in only one sp it gives error message something like this; "Incorrect number of arguments for PROCEDURE sproc_t_l_Contract_Select_BySearchCriteria; expected 3, got 2” Work long time on this sp but coudnt find it. So i tried to write it again from the begining. In this time it was work perfectly.This problem occurs because of the space between data type and its length. Ex. pName varchar(50) - working pName varchar (50) - Not working But it does not mention syntax error or something.So this error message make us vulnerable.

MSSQL to MySQL Part II

We could able to finish our MSSQL to MySQL conversion project successful. During this project we had to used many client tools because each tool having pros and cons. we used following client tools; mysql-gui-tools-5.0 HeidiSQL SQLyog Toad for MySQL Nevicat 8.0 Lite Among those tools SQLyog Community edition the best tool even though Toad for MySQL provides many features.Toad for MySQL sometimes gives errors when running a query.Nevicat 8.0 Lite is simple and good.But it has not much features. HeidiSQL is also good but it doesn't show other database objects such as stored procedures,view. Only tables are displayed.

MSSQL to MySQL

To day i was struggling to catch a error inside a stored procedure using MySQL. Faced lot of difficulties and still not found good result. There is no equal function in MySql to RAISERROR in MSSQL. As a solution for this what we can we do is, we can call a function as this way CALL RaiseError(); There for because of the none existence of this function this will be raise an error. So it is very logical..:-) So procedure will be work very fine.....Great... Example: DROP PROCEDURE IF EXISTS `dbname`.`procedureName` $$ CREATE DEFINER=`root`@`%` PROCEDURE `edbname`.`procedureName`( pId bigint, pName varchar(50) BEGIN IF EXISTS (SELECT 1 FROM tableName WHERE ((Id = pId) ) THEN UPDATE tableName SET Name = pName, WHERE (Id = pId); ELSE CALL RaiseError(); /*There is no RaiseError metho in MySql. Because of that reason here call nonexistent method which is 'Rais

Orgnized well

When buying things like clothes, set a rule for yourself that you can only buy something new, to replace something you already have. For example, from a practical point of view, let’s say you need to have 15 business shirts. Set a ‘budget’ of having 15 shirts, and then when you want to buy one, first throw away (or give to charity) the worst of the other. Can’t make a choice which one to throw out? Guess what: you won’t need a new shirt. [ http://www.iwillteachyoutoberich.com/blog/tip-9-only-buy-new-things-when-replacing-something-old ]

Codesmith problem

In my mechine i have installed Codesmith and when trying to connect to Mysql DB it is not allowed to access it. Basically it doesnt enable the connection establishing window. Even if you mannually typethe connection string and click on 'Test' button it will say Mysql.data.dll not exist. This is because of compatibility issue... To sortout this.....:-) So i had t installed earlier version. It also did not work. So copy 'MySql.Data.dll' to bin folder of codesmith (C:\Program Files\CodeSmith\v5.0\bin). Mannaully type the connction string and test. Then it will works fine................................

Add column to mid of table

In sql Server you cant add a column to mid of a table .If you add a new column to existing table then it will append end of the table. But in case of adding a column to to mid of the table you can do it like as follows; Create a new table with the required columns, Copy the data from the old table into the new table Delete the old table Then rename the new table. Sample Code ---Old table Create Table A (col1 varchar(50) null, col2 varchar(50) null) --Add new column col3 Begin Transaction Create Table B ( col1 varchar(50) null, col3 varchar(50) null, -- NEW COLUMN IN MIDDLE (NULLABLE) col2 varchar(50) null ) go if exists(select * from A) exec('insert into B (col1, col2) select col1, col2 from A with (holdlock tablockx)') go drop table A go execute sp_rename 'B', 'A', 'object' go commit

NHibernate

This is new topic for me and I started to work on that few days ago. It is interesting to play and I learn lot during the days. :-) .Learning curve of the NHibernate is bit long and few resources are available. But using trial and error could be able to solve lot of problems. What is ? NHibernate is ORM solution and is intended for transparent binding .NET classes to database tables.Commonly we have mismatch beween the relational database and our objects. The aim of the NHibernate is reducing time efforts to switch application to another database provider .Basically it provides low overhead . “NHibernate increases your performance as a developer”.

Research

Last week i play with COM object in dot net.That is very cool. Using COM objects you can read the word document.By doing following thing you can achieve it. Steps you should follow; Add a COM reference to the project by right clicking in the solution explorer on References->Add Reference. Click on the COM tab and look for the Microsoft Word 9.0/ Microsoft Word 11.0/ Microsoft Word 12.0 Object Library. Click Select and OK. In here the object library version depends on your MS.office package what you have installed in your machine .example: If it s Office 2007 the Microsoft Word 12.0 Object Library <--------Source Code--------------> using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.ComponentModel; using Word = Microsoft.Office.Interop.Word; public partial class _Default : System.W

Power of Information visualization

Ben Shneiderman is a giant person in information visualization field and he has contributed for many theories in this field. He has coined what he calls information visualization mantra that leads to information seeking behavior: “ Overview first, zoom and filter, then details on demand” The important point is that a good computer-based visualization is an interface that can support all of these activities. According to this mantra; system should represent the overview of the entire collection, any interested item should be able to zoom, able to filter out uninteresting items, and also able to select an item or group and get details when needed. Any system which follows this mantra can be representing the high volume of information in an effective manner. Figure 1 shows application (Ex: Spotfire) which built upon using this mantra. In this application entire item collection are displayed and any item can be

went for a RMS's session

Last friday i went for Richard Stallment session who is launched the GNU project.Actually it was very interesting session.And he emphsised the what should be the purpose of the free software and he furter said we should dicatate linux as GNU-slash Linux.Becuase linux main part is the GNU.
internal DataTable GetConformedResults(string spName, string fName, string lName) { DataTable dt = new DataTable(); SqlConnection con = new SqlConnection("Data Source=BUDDHIKA-PC\\SQLEXPRESS;Initial Catalog=VertualDoctor;Integrated Security=True"); con.Open(); SqlCommand SqlCmd = new SqlCommand(spName, con); SqlCmd.Parameters.Add("@vcFistName", DbType.String).Value = fName; SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.Add("@vcLastName", DbType.String).Value = lName; SqlCmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter DataAdp = new SqlDataAdapter(); DataAdp.SelectCommand = SqlCmd; DataSet result = new DataSet(); //Create a dataset DataAdp.Fill(result, "result"); //Fill the dataset dt = result.Tables["result"]; con.Close(); con.Dispose(); return dt; }

Nature-inspired visualization

Visualizations of complex interrelationships h ave the potential to be complex and require a lot of cognitive input. When creating new approaches for visualization we can derive an alogues from natural systems. People interact with the nature very closely Hence natural inspired concepts can be used to cognitive amplification , moving the load from the user's cognitive to their perceptual systems and thus allowing them to focus their cognitive resources where they are most appropriate There are two systems as follows: physical-based model biological inspiration Lot of day today actions are happening mediated by technology. So these action can be recorded and analyzed .At that poi nt we will be able to find some interesting patterns and interesting thing about the data. These result can be used for yielding insights into our behavio r, desires and goals, providing marketing companies with identified opportunities to sell new products into, or medical companies with info

Working with Agent Technology

Currently i am doing my 4th year project based on Agent Technology.It is really cool and also new experinece.Basically the output will be the intelligent agent who is living in your operting sysem and you can command to him wtih Natural Language. In here we are using JADE flatform and Protege to develp the the system.

Akeelah and the Bee

A heart-warming, triumph-over adversity drama, AKEELA AND THE BEE centers on a precocious eleven-years-old girl, Akeelah Anderson, form south Los Angels, who is discovered to have a talent for words. In spite of the objections of her mother Wanda,Keke enters a spelling contest. Her gift takes her to compete in the National Spelling Bee, the most famous competition of its kind in the world…. One of fabulous phrase attached with this film “Pulchritude-its derive form Latin word pulcher meaning Beautiful .Isn’t it? You know that feeling where everything feels right? Where you don't have to worry about tomorrow or yesterday, where you feel safe and know you're doing the best you can? There's a word for that, it's called love. L-O-V-E.

Information visulization

Information visualizaion can be states as follows: “ The use of computer-supported, interactive, visual representations of abstract data to amplify cognition. ” I feel if Ptolemy did not find a way to represent a location still we don't know where we are in this world. This is a simple example which shows, to amplify our cognition there should be a stimuli. Then information visualization is highly efficient way for the mind to directly perceive data and discover knowledge and insight from it. So lots of researches are going on this area. The reasons for that is Human beings are tremendously influenced by sensory perceptions The way that we learn, grow, understand, and adapt is based on our ability to view, perceive, and conceptualize thoughts and ideas The power to visualize and graphically represent results, ideas, solutions, and problems in multiple dimensions, as well as to manipulate data and virtually collaborate with others, is the next big revolution

Start to blogging.....

I created this blog bit earlier.But i didn't use it until today.With the dawn of 2008 hope to continue blogging.Its just like beginning to use a house which was not used for a long time . So hope to enjoy by blogging the things . " Since human beings themselves are not fully debugged yet, there will be bugs in your code no matter what you do . "