15,908,254 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 Manish Arya (Top 34 by date)
Manish Arya
29-Oct-13 2:33am
View
same problem
Manish Arya
29-Oct-13 2:12am
View
string connstr = @"Server=192.168.10.2\MSSQL;Initial Catalog=RPSJDB; Uid=Sa; Pwd=manish; Max Pool Size=100";
yes I m connected with sql management studio. I can insert,delete everything.
Manish Arya
8-Sep-13 5:56am
View
nothing
Manish Arya
8-Sep-13 4:28am
View
sir i know how to insert the value but i want to know about the radiobutton value how to insert.
Manish Arya
6-Sep-13 3:58am
View
sir if i use two radiobutton insted of combobox and one listbox.when first radio button select by the user then show in gold item in listbox. When second radio button selected by the user then show in silver item in listbox.it's right or wrong.
Manish Arya
5-Sep-13 13:28pm
View
ok sir
fine
sorry again.
Manish Arya
5-Sep-13 12:45pm
View
thanks sir
for open my eyes.
Manish Arya
5-Sep-13 12:22pm
View
if i hearted you then sorry, its for my practice only.
Manish Arya
5-Sep-13 12:11pm
View
Dear sir,
i am new in c#. i am learning the c# with visual studio. i want to try for creating a small project. if you are not intreseted for give me a example code then not a problem sir,pls tell me how it,s possible.
Manish Arya
4-Sep-13 10:21am
View
thanks
Manish Arya
4-Sep-13 3:10am
View
yes last record
means:
customer ID automatic generated like
CustomerId 1
CustomerId 2
CustomerId 3
CustomerId 4
CustomerId 5
now textbox1 =5 and then textbox2=6(which is currently used by the program)
Manish Arya
4-Sep-13 1:17am
View
thnks sir
Manish Arya
4-Sep-13 0:41am
View
sir pls tell me how?
what is the coding write in this program?
Manish Arya
3-Sep-13 23:50pm
View
yes it is numeric. In varchar, All Character will be inserted (numeric,Character) but i want to only insert numeric value may be its blank. is it only way that i pass the 0 value in the textbox??
Manish Arya
3-Sep-13 11:44am
View
Dear Sir,yes i m using connection string. i m using the c# language.
i want to tell you what m i doing in this prject.
i m creating some window form and a parent form and connect through the connection string and its working fine in my single system. i want to know about this program could be run or not on the network when i m installed the client software in the first computer and database installed in the second system.
if it is not worked then how can be set the network property.
Manish Arya
3-Sep-13 8:11am
View
i m changing the datatype numeric to varchar.it's working.
but i want to write in numeric datatype and what is the different query.
Manish Arya
3-Sep-13 4:55am
View
yes its numeric and not null
Manish Arya
3-Sep-13 2:49am
View
same problem
private void btnSave_Click(object sender, EventArgs e)
{
string connstr = @"Server=.\SQLEXPRESS ;Initial Catalog=RPSJDB;Integrated Security=True; Max Pool Size=100";
SqlDataReader reader = null;
SqlConnection conn = null;
try
{
string query = "insert into CustomerTable values('" + txtCustomerName.Text + "','" + txtAddress.Text + "','"
+ txtMobileNo.Text + "','" + lblGoldBalance.Text + "','" + lblSilverBalance.Text + "','" + lblCashBalance.Text + "')";
conn = new SqlConnection(connstr);
if (txtCustomerName.Text != "" & txtAddress.Text != "")
{
conn.Open();
//Checking User Name Exists in CustomerTable
string query1 = "select txtCustomerName from CustomerTable where txtCustomerName='" + txtCustomerName.Text + "'";
SqlCommand cmd = new SqlCommand(query1,conn);
reader = cmd.ExecuteReader();
if (reader != null && reader.HasRows)
{
//User exists in db do something
MessageBox.Show("User Already Exists!!");
}
else
{
SqlCommand cmd1 = new SqlCommand(query, conn);
cmd1.ExecuteNonQuery();
txtCustomerName.Clear();
txtAddress.Clear();
txtMobileNo.Clear();
MessageBox.Show("Values Save in DataBase");
}
reader.Close();
conn.Close();
}
else
{
MessageBox.Show("Only Mobile Field Can be Empty");
}
}
catch (Exception ex)
{
MessageBox.Show("At Least 0 value can be save in the Gold Silver Cash Area", ex.Message);
}
finally
{
reader.Close();
conn.Close();
}
Manish Arya
3-Sep-13 1:33am
View
its working
thanks
Manish Arya
2-Sep-13 10:17am
View
yes i want just one time data save into database
i am using for insert above code:
private void btnSavePrice_Click(object sender, EventArgs e)
{
string connstr = @"Server=.\SQLEXPRESS ;Initial Catalog=RPSJDB;Integrated Security=True; Max Pool Size=100";
string query = "insert into PriceTable values('" + txtPriceGold.Text + "','" + txtPriceSilver.Text + "')";
SqlConnection conn = new SqlConnection(connstr);
if (txtPriceGold.Text != "" & txtPriceSilver.Text != "")
{
conn.Open();
SqlCommand cmd = new SqlCommand(query, conn);
cmd.ExecuteNonQuery();
txtPriceGold.Clear();
txtPriceSilver.Clear();
MessageBox.Show("Values Save in DataBase");
conn.Close();
}
else
{
MessageBox.Show("Enter some value in the box");
}
}
Manish Arya
2-Sep-13 5:02am
View
private void txtPriceGold_Enter(object sender, EventArgs e)
{
string connstr = @"Server=.\SQLEXPRESS ;Initial Catalog=RPSJDB;Integrated Security=True; Max Pool Size=100";
string strSql = "select txtPriceGold from PriceTable Where txtPriceGold=" + txtPriceGold.Text + "";
SqlConnection conn = new SqlConnection(connstr);
conn.Open();
SqlCommand objCommand = new SqlCommand(strSql, conn);
using (SqlDataReader reader = objCommand .ExecuteReader())
{
while(reader.Read())
{
txtPriceGold.Text = reader["txtPriceGold "].ToString();
}
}
conn.Close();
}
Incorrect syntax near '='.
same problem.
Manish Arya
2-Sep-13 4:13am
View
Incorrect syntax near '='.
line is:
using (SqlDataReader dr = objCommand.ExecuteReader())
Manish Arya
2-Sep-13 3:26am
View
private void txtPriceGold_Enter(object sender, EventArgs e)
{
string connstr = @"Server=.\SQLEXPRESS ;Initial Catalog=RPSJDB;Integrated Security=True; Max Pool Size=100";
string strSql = "select txtPriceGold from PriceTable Where txtPriceGold="+ txtPriceGold.Text + "";
SqlConnection conn = new SqlConnection(connstr);
conn.Open();
SqlCommand objCommand = new SqlCommand(strSql, conn);
using (SqlDataReader dr = objCommand.ExecuteReader())
{
bool success = dr.Read();
if (success)
{
txtPriceGold.Text = dr.GetString(1);
}
}
conn.Close();
error is:
Incorrect syntax near ','.
Manish Arya
2-Sep-13 2:10am
View
private void txtPriceGold_Enter(object sender, EventArgs e)
{
string connstr = @"Server=.\SQLEXPRESS ;Initial Catalog=RPSJDB;Integrated Security=True; Max Pool Size=100";
string strSql = "select txtPriceGold from PriceTable Where txtPriceGold='" + txtPriceGold.Text + "'";
SqlConnection conn = new SqlConnection(connstr);
conn.Open();
SqlCommand objCommand = new SqlCommand(strSql, conn);
using (SqlDataReader dr = objCommand.ExecuteReader())
{
bool success = dr.Read();
if (success)
{
txtPriceGold.Text = dr.GetString(1);
}
}
conn.Close();
error is
"Error converting data type varchar to numeric."
Manish Arya
2-Sep-13 1:12am
View
private void txtPriceGold_Enter(object sender, EventArgs e)
{
string connstr = @"Server=.\SQLEXPRESS ;Initial Catalog=RPSJDB;Integrated Security=True; Max Pool Size=100";
string strSql = "select txtPriceGold from PriceTable Where txtPriceGold='" + txtPriceGold + "'";
SqlConnection conn = new SqlConnection(connstr);
try
{
conn.Open();
SqlCommand objCommand = new SqlCommand(strSql, conn);
using (SqlDataReader dr = objCommand.ExecuteReader())
{
bool success = dr.Read();
if (success)
{
txtPriceGold.Text = dr.GetString(1);
}
}
conn.Close();
}
catch (Exception)
{
MessageBox.Show("error");
}
Manish Arya
2-Sep-13 0:37am
View
same problem
Manish Arya
30-Aug-13 11:25am
View
pls give me a example code.
Manish Arya
30-Aug-13 3:47am
View
yes i m sure sir.
Manish Arya
30-Aug-13 3:42am
View
like
Manish
Manu
Toni
Twinkle
Manish Arya
29-Aug-13 4:47am
View
Dear sir,
i m using vs2008 and sql database.
i have a window form and i am creating a textbox and a database table, named EntryTable which have a column “customer name “.
I am add some data in this column like “manish, manu”. when I run the program and type in the textbox like “m” then its automatically show name “manish, manu”.
Manish Arya
29-Aug-13 1:30am
View
thanks sir i will try.
Manish Arya
29-Aug-13 1:25am
View
sorry sir i am trying many times but the link show a blank page.only its shows article posted by Amit Jain.
Manish Arya
29-Aug-13 0:55am
View
because i am not aware with the jquery and ajax toolkit
Manish Arya
29-Aug-13 0:53am
View
win application
Show More