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
Ram Prasad
NA
326
18.2k
Comparing output of program with the sqlite database
Jan 27 2021 6:06 AM
I am comparing dataVal output with the sqlite database as shown in the code below.
For Example: Lets assume output of dataVal is Kelly. When I run the program, in the first loop string z stores value "K" and then store "Kelly" only after second loop. Can someone please elaborate what is happening here and how to get the value of z as 'Kelly' after first loop?
dataVal = string.Join("", dataResult.ToArray());
Aryabase databaseObject = new Aryabase();
if (dataVal.StartsWith('k'))
{
using (SQLiteConnection con = new SQLiteConnection(databaseObject.myConnection))
{
SQLiteCommand cmd = new SQLiteCommand("select * from k where Data like 'k%'", con);
con.Open();
var rdr = cmd.ExecuteReader();
while (rdr.Read())
{
string z = Convert.ToString(rdr["Data"]);
if (dataVal == z)
{
Console.WriteLine(Convert.ToString(rdr["Data"]));
}
}
}
}
Reply
Answers (
1
)
Regarding lists
print current record in crystal report without print preview