M
meka
For i = 0 To dtSubOpt.Rows.Count - 1
intOptNo = dtSubOpt.Rows(i)(1)
strSelectSubOpt = "select tblOptions.strOptName as
OptionName,tblOptions.intParent ,tblMOMT.strMOTag as
MessageSentFromServer,tblMOMT.strMTTag as MessageSentToServer from
tblOptions inner join tblMOMT on tblMOMT.intOptId=tblOptions.intOptId
where intParent=" & intOptNo & " order by OptionName"
dtOptName = dbCon.GetRecordSet(strSelectSubOpt, "tblOptions")
Next
In my above coding i need to keep all the records retrieved through
looping the query in the same datatable.
In my coding every time intOptNo has changed and retrieve the records
corresponding to that particular intOptNo . The loop executed every
times and get the records ,but the records overwrite the records
already in a datatable this is my problem .So to avoid this I need to
increment the index of the datatable row .But I don't know how to
change the row index depending upon the number of rows returned by
the query .Is there any way to find the row index of the datatable and
to increment that no to keep the next records orelse tell me some
other way to keep all the records retrieved through looping the
query in the same datatable or in the same DataSet.
Kindly expecting the reply,
meka.
intOptNo = dtSubOpt.Rows(i)(1)
strSelectSubOpt = "select tblOptions.strOptName as
OptionName,tblOptions.intParent ,tblMOMT.strMOTag as
MessageSentFromServer,tblMOMT.strMTTag as MessageSentToServer from
tblOptions inner join tblMOMT on tblMOMT.intOptId=tblOptions.intOptId
where intParent=" & intOptNo & " order by OptionName"
dtOptName = dbCon.GetRecordSet(strSelectSubOpt, "tblOptions")
Next
In my above coding i need to keep all the records retrieved through
looping the query in the same datatable.
In my coding every time intOptNo has changed and retrieve the records
corresponding to that particular intOptNo . The loop executed every
times and get the records ,but the records overwrite the records
already in a datatable this is my problem .So to avoid this I need to
increment the index of the datatable row .But I don't know how to
change the row index depending upon the number of rows returned by
the query .Is there any way to find the row index of the datatable and
to increment that no to keep the next records orelse tell me some
other way to keep all the records retrieved through looping the
query in the same datatable or in the same DataSet.
Kindly expecting the reply,
meka.