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
Mittal Joshi
NA
34
0
remove redundant data from database.
Oct 14 2009 1:20 AM
I have some application no stored in database through search.if i again search any journal and if no is again match then it will no be store.........can anybody give me code for this.
i have tried this....
con =
new
OleDbConnection
(
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|app_search.mdb;Persist Security Info=True"
);
con.Open();
cmd =
new
OleDbCommand
(
"select Application_no from Published_Application"
, con);
adp1 =
new
OleDbDataAdapter
(cmd);
adp1.Fill(ds2);
int
s = ds2.Tables[0].Rows.Count ;
int
t = 0;
dr3 = cmd.ExecuteReader(
CommandBehavior
.Default);
while
(dr3.Read())
{
if
(t < s)
{
//string abc = dr1[0].ToString();
if
(test_app1 != dr3[0].ToString())
{
while
(t == s)
{
if
(k.Trim().Contains(test_app))
{
//test_app = test_app.Replace(" ", "/");
string
k1 = k.Trim();
cn =
new
OleDbConnection
(
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|app_search.mdb;Persist Security Info=True"
);
int
pNum =
int
.Parse(myFields.ExecuteThisJavascript(
"event.value=this.getPageLabel("
+ p +
",true);"
));
cn.Open();
query =
"insert into Published_Application (Application_no,country,date_app,date_pub,invention,classification,doc_no,priority_date,priority_country,filing_date,international_publication,patent_no,divisonal,Applicant_name,Applicant_Address,inventor_name,journal_no,page_no,j_year) values('"
+ test_app1 +
"', '"
+ test1 +
"','"
+ test2 +
"','"
+ test3 +
"','"
+ test4 +
"' , '"
+ test5 +
"','"
+ test6 +
"','"
+ test7 +
"', '"
+ test8 +
"','"
+ test9 +
"','"
+ test10 +
"' ,'"
+ test11 +
"','"
+ test12 +
"', '"
+ test13 +
"','"
+ test13_1 +
"', '"
+ test14 +
"','"
+ journal +
"','"
+ p1 +
"','"
+ journal2 +
"')"
;
cmd =
new
OleDbCommand
(query, cn);
cmd.ExecuteNonQuery();
cn.Close();
}
}
t = t + 1;
}
//t = t + 1;
}
}
Reply
Answers (
6
)
how to store the text box values to data table in asp
TreeView implementation in ASP.NET with SQL Server 2005