Valhalla Legends Archive

Programming => General Programming => .NET Platform => Topic started by: Mangix on September 09, 2005, 10:04 PM

Title: [VB .NET]OleDB
Post by: Mangix on September 09, 2005, 10:04 PM
im trying to access a database and do a few stuff with it. well i already have connected to the database but i dont know how to do anything with it. im looking for something that can make a recordset of that. anyone know how i can do this?
Title: Re: [VB .NET]OleDB
Post by: MyndFyre on September 10, 2005, 03:20 AM
You don't make a RecordSet, that's a COM object.  You'll want to make a DataSet.  I'd go with something like:


OleDbDataAdapter da = new OleDbDataAdapter(myConnection, new OleDbCommand("SELECT * FROM Users;"));
DataSet ds = new DataSet();
da.Fill(ds);

That's the best of my memory.  A DataSet can represent more than one table.
Title: Re: [VB .NET]OleDB
Post by: Mangix on September 10, 2005, 02:39 PM
thanks :)