tags:

views:

12

answers:

1

Hi, in VBA I assign variables with values retreived from a recordset like this:

variable1 = rs("column1")
variable2 = rs("column2")

Can I do the same in C#?

+1  A: 

ADODB has been deprecated for years. For data access in .NET, you should use ADO.NET (DbConnection, DbCommand, DbDataReader, DataSet, DataTable, DbDataAdapter...)

If you really must use ADODB, see this question on MSDN.

Thomas Levesque
Thanks Thomas, do you think you could give me an example of using ADO.NET to do this?
Brian
ADO.NET is a very large subject, I can't really give you a meaningful exemple... However there are plenty of examples in the MSDN documentation.
Thomas Levesque