This is a nice sql query, I was afraid with a table and finally i got WITH CASE which helped me to implement confition in query. nice……..
SELECT CASE WHEN price IS NULL THEN ‘Not yet priced’ WHEN price = 10 and price THEN ‘Very Reasonable Title’ WHEN price >= 10 and price <= 20 THEN ‘Coffee [...]
Archive for February, 2006
case in sql(a nice sql query)
Posted in SQL Server, tagged sql on February 28, 2006 | 2 Comments »
using Calendar control in ASP.NET
Posted in C#.NET, tagged C#.net on February 26, 2006 | Leave a Comment »
This is a nice Calendar in ASP
<form name=”form1″ runat=server><asp:Label id=”Label1″ style=”Z-INDEX: 101;runat=”server”></asp:Label>
<asp:calendar id=”Calendar1″ runat=”server”
OnSelectionChanged=”Date_Selected” SelectWeekText=”week”
SelectMonthText=”month” SelectionMode=”DayWeekMonth”
NextPrevFormat=”ShortMonth” Font-Size=”12px”
Font-Name=”Verdana”>
<TodayDayStyle Font-Bold=”True” />
<DayHeaderStyle Font-Bold=”True” />
<OtherMonthDayStyle ForeColor=”gray” />
<TitleStyle BackColor=”#3366ff” ForeColor=”white” Font-Bold=”True” />
<SelectedDayStyle BackColor=”#ffcc66″ Font-Bold=”True” />
<NextPrevStyle ForeColor=”white” Font-Size=”10px” />
<SelectorStyle BackColor=”#99ccff” ForeColor=”navy” Font-Size=”9px” />
</asp:calendar>
</form>
After writing this in your .aspx page go to .aspx.cs page and write this
protected void Date_Selected(object sender, EventArgs e) [...]
read rss feed using c#
Posted in C#.NET, tagged C#.net on February 25, 2006 | 1 Comment »
I read a rss from web site. Here the example
DataSet ds = new DataSet();
ds.ReadXml
(http://newsrss.bbc.co.uk/rss/ newsonline_world_edition/front_page/rss.xml, XmlReadMode.Auto);
DataGrid1.DataSource=ds.Tables["item"];
DataGrid1.DataBind();
Label1.Text=ds.Tables[3].Rows[5][1].ToString(); //read from a dataset and get a cell
important in query
Posted in SQL Server, tagged sql on February 16, 2006 | Leave a Comment »
Some time we want not to get null values returning from our query and to protect this need to use ISNULL. hrre is an example fo using ISNULL.
ISNULL((SELECT name FROM employee WHERE id = employeeSalary.eID), ”)
Name of the employee id returnig from this query but if name is null it return a space.
Sometime we need [...]
connection between SQL Server and C#.net
Posted in C#.NET, tagged C#.net on February 8, 2006 | 3 Comments »
Hi, This is an easy thing which i have done, i establish connection between SQL Server and C#.net there is a table in my database named login. My code take name and password from textbox and and password field and then check with the databse if name and passwword is correct then redirenc to a [...]
use bangla font in java
Posted in java, tagged font, java on February 6, 2006 | 2 Comments »
i tried to write bangla font in a text field and have dane this successfully. Here is the source code of using bangla font in java.
File fontFile = new File(“Boishkhi.ttf”);
FileInputStream inStream = new FileInputStream(fontFile);
Font banglaFont =Font.createFont(Font.TRUETYPE_FONT,inStream);
banglaFont =banglaFont.deriveFont(Font.PLAIN,12);
textField.setFont(banglaFont);
Here i am using Boisgakhi.tff as an example you can use any font just change [...]
read doc file from c#
Posted in C#.NET, tagged C#.net on February 4, 2006 | 1 Comment »
I have read a word file successfully using c#.net and printing this file on a rich text editor.here is the souce code
Word.Application app=new Word.ApplicationClass();
object nullobj=System.Reflection.Missing.Value;
object file = @”C:test.doc”;
Word.Document doc = app.Documents.Open
( ref file, ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref [...]

