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
Purba Anggara
NA
175
5.7k
search Data Error
May 9 2016 1:23 AM
public
List<Pelanggan> GetByName(
string
Nama)
{
List<Pelanggan> daftarPG =
new
List<Pelanggan>();
strSql =
"select TabelPelanggan.*,JenisPelanggan.nama as JenisPelanggan,Pekerjaan.nama as Pekerjaan from TabelPelanggan "
+
"inner join JenisPelanggan on (TabelPelanggan.idJenisPelanggan=JenisPelanggan.ID) "
+
"inner join Pekerjaan on (TabelPelanggan.idPekerjaan=Pekerjaan.ID) "
+
"where status=1 and upper(TabelPelanggan.nama) Like @1 ORDER BY TabelPelanggan.KodePelanggan "
;
using
(FbCommand cmd =
new
FbCommand(strSql, conn))
{
cmd.Parameters.AddWithValue(
"@1"
,
"'%"
+ Nama.ToUpper() +
"%'"
);
using
(FbDataReader dtr = cmd.ExecuteReader())
{
while
(dtr.Read())
{
daftarPG.Add(MappingRowToObject(dtr));
}
}
}
return
daftarPG;
}
search Database firebird
Reply
Answers (
3
)
Control a Datagrid from another class
How to get current latitude and Longitude in Window form