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
Jacob Bahula
NA
12
16.5k
populate dataset using classes
Aug 3 2006 6:53 AM
hi guys i am trying to populate dataset using classes but it gives me this error" Cannot create an instance of the abstract class or interface" and here is my code.
public class DataAcces
{
public SqlConnection conn;
//public SqlCommand cmdDisplay;
public DataSet dsDisplay ;
public DataAdapter daDisplay;
private string ConString = "integrated security = SSPI;initial catalog = Phusa;server = za211149;persist security info = false";
public DataAcces()
{
//
// TODO: Add constructor logic here
//
}
public bool Connection()
{
try
{
conn = new SqlConnection(ConString);
DataAdapter daDisplay = new DataAdapter("SELECT * FROM Customers",conn);
dsDisplay = new DataSet();
daDisplay.Fill(dsDisplay);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
return false;
}
return true;
}
Reply
Answers (
1
)
Take picture with digital camera using C#
Copy files/code to a new project