TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Israel
631
1.3k
217.3k
Order by (doesnt works)
Apr 23 2016 10:19 AM
Hi!
How can I filter by order? I do try this but its doesnt works properly:
string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\lunaoffice\lunaoffice\\app_data\office.mdb;Persist Security Info=False";
OleDbConnection sqlCon = new OleDbConnection(connectionString);
sqlCon.Open();
string commandString = "select * from stock
order by N_O
where code ='" + txtCode.Text + "'";
OleDbCommand sqlCmd = new OleDbCommand(commandString, sqlCon);
OleDbDataReader read = sqlCmd.ExecuteReader();
if (read.HasRows)
{
while (read.Read())
{
txtNumber.Text = read["number"].ToString();
txtProduct.Text = read["product"].ToString();
}
}
else
{
MessageBox.Show("This code " + txtCode.Text + " doenst exist");
}
read.Close();
sqlCon.Close();
Reply
Answers (
4
)
Data export and import from C# to tally and tally to C#
Bulk XML to SQL server database parsing