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
703
1.3k
215.6k
How can I insert at the first line into my database
Jan 25 2017 9:19 AM
Hi!
I need to try something I never tryied before.
With these codes I can insert records ONLY at the end of my database.
But I would like to learn how can I insert one row as the first row among all the rows.
if (conn.State != ConnectionState.Open)
conn.Open();
OleDbParameter data = new OleDbParameter("@data", OleDbType.VarChar);
OleDbParameter qde = new OleDbParameter("@qde", OleDbType.VarChar);
OleDbParameter descritivo = new OleDbParameter("@descritivo", OleDbType.VarChar);
comm.Parameters.Add(data);
comm.Parameters.Add(qde);
comm.Parameters.Add(descritivo);
data.Value = "0";
qde.Value = "0";
descritivo.Value = "-";
comm.Connection = conn;
//comm.CommandText = "insert into facturacao ([data],[qde],[descritivo]) values(@data,@qde,@descritivo)";
comm.CommandText = "insert into mesa1 ([data],[qde],[descritivo]) values(@data,@qde,@descritivo)";
comm.ExecuteNonQuery();
{
conn.Close();
}
Reply
Answers (
5
)
How to set rules on AspNetRules?
What is INETMGR in .net and what is it purpose?