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
David Fry
NA
1
1.7k
MS Database Read, Write, Update
Dec 13 2012 2:14 PM
Write, Update, Read (MS Access DB)
How do I complete this code?
values & where_values are separated by a ','
internal class Database
{
public bool Write(string table, string values)
{
try
{
Console.WriteLine("DB - Write: " + table + ", " + values);
// Write to database - NOTE: No problem with input values
// Successful
return true;
}
catch
{
// Failed
return false;
}
}
public bool Update(string table, string where_values, string values, string write_field = "")
{
try
{
Console.WriteLine("DB - Update: " + table + ", " + where_values + ", " + write_field + ", " + values);
// Edit database - NOTE: If write field specify, change that field only.
// Successful
return true;
}
catch
{
// Failed
return false;
}
}
public string Read(string table, string where_values, string field)
{
try
{
string result = "";
Console.WriteLine("DB - Read: " + table + ", " + where_values + ", " + field);
// Read database - NOTE: No Problem with Input Values
// Successful
return result;
}
catch
{
// Failed
return "";
}
}
Reply
Answers (
0
)
gridview
C# Adding a Class To List changes all data previously added