How can you loop through a record set?
ThanksRecord Sets are so old fashioned.
Are you talking about a DataSet? DataReader?
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Brian Shannon" <bshannon@.lbrspec.com> wrote in message
news:uhksQQRZEHA.3112@.TK2MSFTNGP09.phx.gbl...
> How can you loop through a record set?
> Thanks
>
Yes I mean datasets, sorry I am working between Access 2000 and .NET!
But I got if figured out!
But I figured it out.
"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:OByxk4SZEHA.3112@.TK2MSFTNGP09.phx.gbl...
> Record Sets are so old fashioned.
> Are you talking about a DataSet? DataReader?
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
>
> "Brian Shannon" <bshannon@.lbrspec.com> wrote in message
> news:uhksQQRZEHA.3112@.TK2MSFTNGP09.phx.gbl...
>
You can use oledbconnection and oledbdatareader to connect to Access 2000.
Here you can loop through datareader in following manner
int AppointmentID
string strsql = "Select * from Tbl_Appointment = " + AppointmentID + "";
olcon= new OleDbConnection(GetConnString());
olcon.Open();
oleCmd=new OleDbCommand(strsql,olcon);
oledata=oleCmd.ExecuteReader();
while(oledata.Read())
{
AppointmentID= = Convert.ToInt64(oledata["AppointmentID"]);
}
Here you can loop through datasets in following manner
OleDbConnection OlCon = new OleDbConnection();
OlCon.ConnectionString = GetConnString();
OlCon.Open();
OleDbDataAdapter SelectUserAD = new OleDbDataAdapter(selectusersql,OlCon);
OleDbDataAdapter SaveUserRightsAD = new OleDbDataAdapter("select * from empl
oyee",OlCon);
DataSet SelectUserDs = new DataSet();
SelectUserAD.Fill(SelectUserDs,"Table");
foreach(DataRow ObjUserRow in SelectUserDs.Tables[0].Rows)
{
//perform your operations here
}
--
Vijay Sachan
MCP - ASP.NET
"Brian Shannon" wrote:
> Yes I mean datasets, sorry I am working between Access 2000 and .NET!
> But I got if figured out!
> But I figured it out.
> "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> news:OByxk4SZEHA.3112@.TK2MSFTNGP09.phx.gbl...
>
>
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment