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
Mfwamba Tshimanga
NA
155
46.2k
showing information from database automatically...
Nov 24 2014 10:18 AM
Hi!
I have two forms ("entry" and "reservation").
I have one database with have two columns ("datereservation" and "names").
In opening the "entry" form if there is any reservation date today, the "reservation" form should open automatically. In other case its couldnot.
Please have a look on my codes:
string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\hotel\hotel\\app_data\reservation.mdb;Persist Security Info=False";
OleDbConnection sqlCon = new OleDbConnection(connectionString);
sqlCon.Open();
string commandString = "select * from reservation where datereservation ='" + DateTime.Now + "'";
OleDbCommand sqlCmd = new OleDbCommand(commandString, sqlCon);
OleDbDataReader read = sqlCmd.ExecuteReader();
{
MessageBox.Show("There is no reservation " + DateTime.Now + " encontrada(s)");
}
read.Close();
sqlCon.Close();
RptReservation reserv = new RptReservation ();
reserv.ShowDialog();
Reply
Answers (
3
)
How can I find the platform to deploy in Windows Universal?
Browse and Select File