15,891,703 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Vijaydhas (Top 65 by date)
Vijaydhas
14-Mar-14 1:46am
View
Rating Interval 1 = 18
Rating Interval 2 = 4
Rating Interval 3 = 20
Rating Interval 4 = 5
Rating Interval 5 = 7
I have to extract like this..
Vijaydhas
11-Dec-13 13:10pm
View
It is also working..!!
Vijaydhas
11-Dec-13 13:04pm
View
Can You give me query for this? Please..!!
Write a query to show total amount ordered for each month of each year. Column needed are month, year and total amount.
Vijaydhas
11-Dec-13 12:56pm
View
Super Gi.. Super Gi.. Super Gi.. It's Working.. I only concentrate in sub query. But now only i realize it is possible without Sup query..
Thanks for instant reply..
Vijaydhas
11-Dec-13 12:48pm
View
Query:
Select Item,COUNT(quantity) AS TOTAL_ORDER from Items_Order Group By item having COUNT(quantity)>1 order by COUNT(quantity) desc;
O/P
Item Total_Order
Tent 3
Pen 2
Shoe 2
When i pass this query into sub query
select top 3 * FROM (Select Item AS ITEM,COUNT(quantity) AS TOTAL_ORDER from Items_Order Group By item having COUNT(quantity)>1) AS ord;
O/P
Item Total_Order
Pen 2
Shoe 2
Tent 3
Query:
Select Item,COUNT(quantity) AS TOTAL_ORDER from Items_Order Group By item order by COUNT(quantity) desc;
O/P
Item Total_Order
Tent 3
Shoe 2
Pen 2
Pogo stick 1
Raft 1
Ring 1
Shirt 1
Laptop 1
Mobile 1
Pant 1
Paper 1
Now i want pass this query to select top 3 rows. I pass like this:
select top 3 * FROM (Select Item AS ITEM,COUNT(quantity) AS TOTAL_ORDER from Items_Order Group By item order by COUNT(quantity) desc) AS ordered;
But it shows error:
Msg 1033, Level 15, State 1, Line 1
The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.
Vijaydhas
9-Dec-13 1:52am
View
Sure.. Thank you.. :-)
Vijaydhas
9-Dec-13 1:46am
View
Actually I tried myself.
//Read only a single char
int i = Console.Read();
Console.WriteLine(i);
// Read the whole string
sting s = Console.ReadLine();
Console.WriteLine(s);
// Difference between ReadKey() and ReadLine()
//Console.ReadKey();
Console.ReadLine();
I can not get the clear idea.. That's why i ask in this Experts Site..!! And thanks for your advice..!! :-)
Thank you..!!
Vijaydhas
9-Dec-13 1:35am
View
I read some simple topics.. But i can not get the exact answer to me. After ridoy's answer i found one more reference. http://www.dotnetperls.com/console-read
This link was clear about my doubt..
(Sorry For my poor language..)
Vijaydhas
9-Dec-13 1:25am
View
I have attend 29 interviews.. 7 company where ask this question. Coming Saturday i am going to attend 30th interview. For that i preparing for that. May be there also they will ask this same question..!!
Vijaydhas
9-Dec-13 1:10am
View
But in another website they say like
Console.Readline() accepts the string and returns the string.
Console.Read() accepts the first character of the string and returns ASCII Code(Integer Value) of that first character
Console.ReadKey accepts the Character entered in the command prompt and returns the key info pressed with the modifiers(cntrl,shift,Alt) used while pressing the key.Info like which key pressed,ASCII Code of the Key and Modifiers used and the type of the key which will always be char.
Vijaydhas
9-Dec-13 1:06am
View
Thank you.. It's very useful example. Easy to understand. Thanks again for instant reply..!!
Vijaydhas
9-Dec-13 0:36am
View
Already i refer this both websites. But there is no example. Please give me simple example.
Vijaydhas
7-Dec-13 11:10am
View
Thank you.. It's Working and easy to understand. Thanks..
Vijaydhas
7-Dec-13 11:09am
View
Thank you. It's working. I am new to program. That's why i have some faults.. Now only practicing for coding.. Thanks again..
Vijaydhas
26-Nov-13 22:04pm
View
Is it possible without try, catch method?
Vijaydhas
26-Nov-13 13:24pm
View
It is a console Application
I have try this code:
import java.util.*;
import java.io.*;
class vvvv
{
public static void main(String[] args)
{
String input = null;
int number = 0;
try
{
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
input = bufferedReader.readLine();
number = Integer.parseInt(input);
}
catch (NumberFormatException ex)
{
System.out.println("Not a number !");
}
}
}
But i want ask again to the user to give the inout.
Vijaydhas
19-Nov-13 11:50am
View
Sure sir..
Vijaydhas
19-Nov-13 11:42am
View
Sure sir. I will learn from basic. Thank you for instant reply and valuable advises. Thanks again.
Vijaydhas
19-Nov-13 7:40am
View
Hi. Now only i realize that i can only call the functions using of objects. Now nearly i got the logic. But still i have some problem.
I will cal first method from main method. Now it will go to that function. Now i want call another function from this current method. I have to create separate class for all the functions? Then how can i create object and call the methods? Please help me. I am new to java. That's why only i am asking like this.
Sorry if i give more trouble to you.
Vijaydhas
18-Nov-13 22:42pm
View
I got this error message:
sudoku.java:32: illegal start of expression
static int nsol = 0;
^
1 error
Sorry for the incomplete information. I am new to java.
Vijaydhas
18-Nov-13 22:41pm
View
sudoku.java:32: illegal start of expression
static int nsol = 0;
^
1 error
Vijaydhas
11-Oct-13 11:51am
View
No no.. Not like that. Just need an ideas, Past demo links only..
Vijaydhas
10-Oct-13 10:20am
View
Thank you for instant reply. But there no solution for creating DB from Visual Studio? I want create from Visual Studio. Is it possible?
Vijaydhas
8-Oct-13 9:08am
View
Deleted
Hi. Now i can delete the Selected row.
private void button5_Click(object sender, EventArgs e)
{
if (dataGridView2.Rows.Count != 0 && dataGridView2.SelectedRows[0].Index != dataGridView2.Rows.Count)
{
cn.Open();
cmd = new SqlCommand("DELETE FROM Phone_Number WHERE phone=" + dataGridView2.SelectedRows[0].Cells[1].Value.ToString() + "", cn);
cmd.ExecuteNonQuery();
dataGridView2.Rows.RemoveAt(dataGridView2.SelectedRows[0].Index);
MessageBox.Show("Deleted..!!");
cn.Close();
}
Now i want move the Row from one grid view to another grid view.
Please guide me..
Vijaydhas
7-Oct-13 9:25am
View
Oh.. Thank you.. It's working.. That's why i like the code project and code project experts..!!
Thank you...
And i tried this myself.. It is also working..!!
private void comboBox1_Click(object sender, EventArgs e)
{
comboBox1.DroppedDown = true;
}
Vijaydhas
7-Oct-13 9:20am
View
I got it..
private void comboBox1_Click(object sender, EventArgs e)
{
comboBox1.DroppedDown = true;
}
It's working..
Thank you for your instant replay. I am happy with your reply. Once again thank you.
Vijaydhas
7-Oct-13 9:19am
View
I got it..
private void comboBox1_Click(object sender, EventArgs e)
{
comboBox1.DroppedDown = true;
}
It's working..
Thank you for your instant replay. I am happy with your reply. Once again thank you.
Vijaydhas
7-Oct-13 9:19am
View
I got it..
private void comboBox1_Click(object sender, EventArgs e)
{
comboBox1.DroppedDown = true;
}
It's working..
Thank you for your instant replay. I am happy with your reply. Once again thank you.
Vijaydhas
7-Oct-13 9:17am
View
I tried. But it show the list of items when i click the arrow only. If i click anywhere in the combo box mean it did not show the list items.
Vijaydhas
7-Oct-13 9:08am
View
When we click the combo box arrow button it show the list items. But i want where ever click in the combo box(Not only the arrow) i want show the list items.
Now can you understand? Sorry i am very weak in English.
Vijaydhas
7-Oct-13 9:07am
View
When we click the combo box arrow button it show the list items. But i want where ever click in the combo box(Not only the arrow) i want show the list items.
Now can you understand? Sorry i am very weak in English.
Vijaydhas
4-Oct-13 9:41am
View
M.
Vijaydhas
4-Oct-13 8:42am
View
Yes.. I know. But i don't know how to explain my question. I want terminate one by one letter. The count must be start with the next number of terminated number.
for ex
FLAMES. Now i want delete M. That is 4th letter. After then the count must be start from Letter E. This is only i get confused. Consider that that letter are in CLOCKWISE format.
Vijaydhas
4-Oct-13 8:13am
View
Now i have to do this process.
(F = Friend, L = Love, A = Affection, M = Marriage, E = Enemy, S = Sister.)
*) Count the flames from left to right. F is 1, L is 2, A is 3, M is 4, E is 5, S is 6. Now delete S. (FLAME)
*) Next calculate from next word of S. There is no word. So begin from F. F is 1. L is 2, A is 3, M is 4, E is 5, F is 6. Now delete F. (LAME)
*) Now L is 1, A is 2, M is 3, E is 4, L is 5, A is 6. Now delete A. (LME)
*) Now M is 1, E is 2, L is 3, M is 4, E is 5, L is 6. Now delete L. (ME)
*) Now M is 1, E is 2, M is 3, E is 4, M is 5, E is 6. Now delete E; (M)
*) Remaining is M. So the relationship is M. that is marriage.
Vijaydhas
4-Oct-13 8:11am
View
For Example
Vijay
Bamav
In vijay and Bamav the one common char is ‘V’. So first delete ‘V’. Now the both names will be ‘ijay’,’Bama’. Now in ‘ijay’ there is one ‘a’. So I will delete ‘a’ from Bama. Now it will be ‘ijy’,‘Bma’.
So total char is 3+3 = 6;
Now play FLAMES:
(F = Friend, L = Love, A = Affection, M = Marriage, E = Enemy, S = Sister.)
*) Count the flames from left to right. F is 1, L is 2, A is 3, M is 4, E is 5, S is 6. Now delete S. (FLAME)
*) Next calculate from next word of S. There is no word. So begin from F. F is 1. L is 2, A is 3, M is 4, E is 5, F is 6. Now delete F. (LAME)
*) Now L is 1, A is 2, M is 3, E is 4, L is 5, A is 6. Now delete A. (LME)
*) Now M is 1, E is 2, L is 3, M is 4, E is 5, L is 6. Now delete L. (ME)
*) Now M is 1, E is 2, M is 3, E is 4, M is 5, E is 6. Now delete E; (M)
*) Remaining is M. So the relationship is M. that is marriage.
This is flames. Yes It is not real. Just for fun. Sorry. If it is confuse. This is famous game in our area. So that only I try to create a simple application.
Vijaydhas
4-Oct-13 7:59am
View
For Example
Vijay
Bamav
In vijay and Bamav the one common char is ‘V’. So first delete ‘V’. Now the both names will be ‘ijay’,’Bama’. Now in ‘ijay’ there is one ‘a’. So I will delete ‘a’ from Bama. Now it will be ‘ijy’,‘Bma’.
So total char is 3+3 = 6;
Vijaydhas
4-Oct-13 7:59am
View
Deleted
For Example
Vijay
Bamav
In vijay and Bamav the one common char is ‘V’. So first delete ‘V’. Now the both names will be ‘ijay’,’Bama’. Now in ‘ijay’ there is one ‘a’. So I will delete ‘a’ from Bama. Now it will be ‘ijy’,‘Bma’.
So total char is 3+3 = 6;
Now play FLAMES:
(F = Friend, L = Love, A = Affection, M = Marriage, E = Enemy, S = Sister.)
*) Count the flames from left to right. F is 1, L is 2, A is 3, M is 4, E is 5, S is 6. Now delete S.
*) Next calculate from next word of S. There is no word. So begin from F. F is 1. L is 2, A is 3, M is 4, E is 5, F is 6. Now delete F.
*) Now L is 1, A is 2, M is 3, E is 4, L is 5, A is 6. Now delete A.
*) Now M is 1, E is 2, L is 3, M is 4, E is 5, L is 6. Now delete L.
*) Now M is 1, E is 2, M is 3, E is 4, M is 5, E is 6. Now delete E;
*) Remaining is M. So the relationship is M. that is marriage.
This is flames. Yes It is not real. Just for fun. Sorry. If it is confuse. This is famous game in our area. So that only I try to create a simple application.
Vijaydhas
4-Oct-13 7:58am
View
For Example
Vijay
Bamav
In vijay and Bamav the one common char is ‘V’. So first delete ‘V’. Now the both names will be ‘ijay’,’Bama’. Now in ‘ijay’ there is one ‘a’. So I will delete ‘a’ from Bama. Now it will be ‘ijy’,‘Bma’.
So total char is 3+3 = 6;
Now play FLAMES:
(F = Friend, L = Love, A = Affection, M = Marriage, E = Enemy, S = Sister.)
*) Count the flames from left to right. F is 1, L is 2, A is 3, M is 4, E is 5, S is 6. Now delete S.
*) Next calculate from next word of S. There is no word. So begin from F. F is 1. L is 2, A is 3, M is 4, E is 5, F is 6. Now delete F.
*) Now L is 1, A is 2, M is 3, E is 4, L is 5, A is 6. Now delete A.
*) Now M is 1, E is 2, L is 3, M is 4, E is 5, L is 6. Now delete L.
*) Now M is 1, E is 2, M is 3, E is 4, M is 5, E is 6. Now delete E;
*) Remaining is M. So the relationship is M. that is marriage.
This is flames. Yes It is not real. Just for fun. Sorry. If it is confuse. This is famous game in our area. So that only I try to create a simple application.
Vijaydhas
4-Oct-13 6:29am
View
oh sorry. I don't know how to explain. But i found one source. http://www.wikihow.com/Play-%22Flame%22. There is the rules for that game.
Vijaydhas
4-Oct-13 6:17am
View
Thank you..!!
Vijaydhas
4-Oct-13 5:46am
View
But that company staff ask me to write the program using 2 dimensional only. That's why i am asking.
Vijaydhas
4-Oct-13 5:29am
View
Is it possible in two dimensional array??
Vijaydhas
4-Oct-13 5:28am
View
Is it possible in two dimensional array??
Vijaydhas
4-Oct-13 5:25am
View
Thank you..!! It's Working.. :-) .. Useful and also easy to understand..!! Thank you one again..
Vijaydhas
4-Oct-13 5:23am
View
Thank you..!! It's working..!! :-) .. Can you explain this??
Vijaydhas
4-Oct-13 5:22am
View
Thank you..!!
Vijaydhas
11-Sep-13 14:58pm
View
I can not paging in windows form. In ASP .net there is option paging. But how to use that in Windows Forms??
Vijaydhas
11-Sep-13 8:34am
View
Yes.. I want do like that only. How to do that??
Vijaydhas
10-Sep-13 10:29am
View
I solved it bro..
I use this command
Select Name_ from Phone_Number where Place=N'மதுரை';
Vijaydhas
10-Sep-13 10:20am
View
I meet another Problem. I can not retrieve the values using of Tamil Language.
For Example Select Name_ from Phone_Number where Place='மதுரை';
This is not return any values. If i use like
Select Name_ from Phone_Number where Place='Madurai';
it return the values. But i want retrieve the values based on Tamil language only..
Help Me Bro..
Vijaydhas
10-Sep-13 7:48am
View
Sure..!!
Vijaydhas
10-Sep-13 7:47am
View
It's working.. !! Thank you..!! :-)
Vijaydhas
10-Sep-13 7:42am
View
It's Working..!! Thank you..!! :-)
Vijaydhas
10-Sep-13 7:29am
View
Data type is varchar(50)
Vijaydhas
10-Sep-13 7:28am
View
I used this code. Still now i can't insert the value. The value is stored like ?????. If i retrieve this Data to text box mean that also show like ?????.
textBox2.Text=ds.Tables[0].Rows[5][0].ToString();
the value return like ?????.
Vijaydhas
5-Sep-13 13:25pm
View
Oh. Ok. Now i got the idea. Thank you. Now how to deploy the app with SQL.
My process is:
Open new Setup Project.
Right Click on File System on Target Mechine-> Add Special Folder -> Program Files Folder.
Now right click on Program Files Folder -> Add -> Folder
Give Re Name for That folder(Sample)
Now File -> Add -> Existing Project -> .csproj file.
Now Project Files Folder -> Sample -> Add -> Project Output -> Primary Output
Now Right Click on Primary Output From Vijay(Active) -> Shortcut to Primary Output From Vijay(Active) two times. And i give name for that 2 shortcuts.
Now i drag and drop the first shortcut into User's Desktop. Another into User's Program Menu.
Now View -> Editor -> User Interface
Now click on Start -> Add Dialog -> Select Licence Agreement
Click right click on Licence Agreement -> Properties window -> Licence File -> Select Licence.rtf(Already created)
Now Build the solution.
Now i finished the deployment. But I did not include my DB into this app. And i did not give icon for the application. Please tell me how to include the DB and how to add icon for the application. Please..
Vijaydhas
5-Sep-13 12:40pm
View
If i use 50 forms in my application. For that 50 forms i have to give connection string for all the forms?? if i want to change the server name, Than i have to edit all the 50 forms??
Vijaydhas
5-Sep-13 12:39pm
View
If i use 50 forms in my application. For that 50 forms i have to give connection string for all the forms?? if i want to change the server name, Than i have to edit all the 50 forms??
Vijaydhas
5-Sep-13 10:57am
View
This is my simple windows form. Here i have one text box and one button.
i have create DB in SQL server 2008. Data base name Test and Table name is sample. Column name is Value.
My coding is
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Test
{
public partial class Form1 : Form
{
SqlCommand cmd;
SqlConnection cn;
public Form1()
{
InitializeComponent();
cn = new SqlConnection(@"Data Source=.\sqlexpress;Initial Catalog=Test;Integrated Security=True");
}
private void button1_Click(object sender, EventArgs e)
{
try
{
cn.Open();
cmd = new SqlCommand("insert into Sample(Value) values('" + textBox1.Text + "')", cn);
cmd.ExecuteNonQuery();
MessageBox.Show("Success");
cn.Close();
}
catch
{
MessageBox.Show("Error");
}
}
}
}
Now how to declare the Connection in Global?
How to deploy the application with SQL?
Vijaydhas
5-Sep-13 10:51am
View
This is my simple Application.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Test
{
public partial class Form1 : Form
{
SqlCommand cmd;
SqlConnection cn;
public Form1()
{
InitializeComponent();
cn = new SqlConnection(@"Data Source=.\sqlexpress;Initial Catalog=Test;Integrated Security=True");
}
private void button1_Click(object sender, EventArgs e)
{
try
{
cn.Open();
cmd = new SqlCommand("insert into Sample(Value) values('" + textBox1.Text + "')", cn);
cmd.ExecuteNonQuery();
MessageBox.Show("Success");
cn.Close();
}
catch
{
MessageBox.Show("Error");
}
}
}
}
Now how to declare the Connection String in Global?
I know how to deploy the application. But i don't know deploy the application with SQL. Now can you teach me??
Vijaydhas
5-Sep-13 10:24am
View
M. Yes. If it is possible. I tried lots of websites. But I can't get the exact information..
Vijaydhas
5-Sep-13 10:14am
View
Ok. Now think me i don't know about the development. I want to learn from the beginning to end. Just one form, One Text box, One button. How to initialize the global connection, How to insert, And how to deploy the application with SQL. Please Help me..
Vijaydhas
29-Aug-13 4:42am
View
It is also working..!! Thank you..
Vijaydhas
29-Aug-13 4:37am
View
Thank you.. It's working..!! :-) .. I will follow the wiki also.. Once again thank you..
Vijaydhas
29-Aug-13 4:00am
View
Oh.. Thank you for instant replay. I am very new to this command parameters and a parameterized sql query. May i know the differences? Can you explain it to me.. Please.. And now it show error in 'var' and 'cn'. and also show error in 'CultureInfo'.
Show More