Imports System.Data.OleDb dim objParam as OleDbParameter dim objCmd as OleDbCommand dim ObjDr as OleDbDataReader dim objDA as OleDbDataAdapter dim objDS as DataSet dim objRow as DataRow try objConn = new OleDbConnection(strConnection) ' Connection string as you would in ADO objConn.Open() objCmd = New OleDbCommand(strQuery,objConn) objCmd.CommandType = CommandType.StoredProcedure objDA = new OleDbDataAdapter() objDA.SelectCommand = objCmd objParam = new OleDbParameter() with objParam .ParameterName="City" .OleDbType = oleDbType.varchar .Size = 50 .Value = "Derby" end with objDA.SelectCommand.Parameters.add(objParam) objDS = new DataSet() objDA.Fill(objDS,"Records") for each objRow in objDS.Tables("Records").Rows Console.writeLine("County) Next Catch e as exception console.writeLine(e.message) Finally ' Clear and close all objects. End Try
x = objDA.UpdateCommand.ExecuteNonQuery()
*Comments are the views of individuals, they may or may not be correct.All comments are reviewed and accepted or rejected.If you give an email address, you will be sent an email when someone makes a comment on this page.*