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
aida athamnia
NA
23
0
display list of customers
May 15 2010 1:10 AM
Hi,
i want to display list of customers in my database but an error has occured , please help me
error:
'ClientServiceLibrary.ClientTopNet' does not contain a definition for 'Add' and no extension method 'Add' accepting a first argument of type 'ClientServiceLibrary.ClientTopNet' could be found (are you missing a using directive or an assembly reference?)
and there is the code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Data.SqlClient;
using System.Data.OleDb;
using System.Data;
namespace ClientServiceLibrary
{
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
public class ClientTopNetService : IClientTopNetService
{
#region IClientTopNetService Membres
public ClientTopNet ConsultationClient(int ID_CLIENT)
{
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection();
conn.ConnectionString = @"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=topnet;Initial Catalog=TopnetBase;Data Source=SWEET-4B6F892B4\SQLEXPRESS";
ClientTopNet oClients = new ClientTopNet();
System.Data.OleDb.OleDbDataReader rs;
System.Data.OleDb.OleDbCommand comm = new System.Data.OleDb.OleDbCommand("select * from client where ID_CLIENT='"+ID_CLIENT+"'", conn);
rs = comm.ExecuteReader();
while (rs.Read())
{
ClientTopNet oClient = new ClientTopNet();
oClient.LOGIN_CREATION = rs["LOGIN_CREATION"].ToString();
oClient.NOM = rs["NOM"].ToString();
oClient.ADRESSE= rs["ADRESSE"].ToString();
oClients.Add(oClient);
return oClients;
}
}
Reply
Answers (
2
)
WCF Discovery - Client Discovering Old Service
Wcf using workflow