Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
12
Answers
Sql instruction doesnt obey...
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Israel
8y
488
1
Reply
Hi!
I am writing sql code to search the number up or less than "x" (dsiplaying on my datagrid). But its doent work. For instance, show me all number up than 2 or less using a textbox. See my codes please:
conn.Open();
OleDbCommand cmd = conn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText =
"select * from Cliente where [age] ? ?"
; //
Its here
var param1 = new OleDbParameter("@idade", OleDbType.Numeric);
param3.Value =
txtAge.Text
;
cmd.Parameters.Add(param1);
cmd.ExecuteNonQuery();
DataTable dt = new DataTable();
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
da.Fill(dt);
conn.Close();
dvgCons.DataSource = dt;
Post
Reset
Cancel
Answers (
12
)
Next Recommended Forum
how to avoid to insert duplicate data in db.
How to write two select query in one button click event