C# running Access Query with parameters ADO

by ebarcza 3/13/2012 11:40:00 AM
 public DataTable GetFirmwareByBoardID(int boardID)
        {
            GalleryDatabase db = DataBaseFactory.getDataBase(DataBaseName);
 
            OleDbCommand cmd = new OleDbCommand();
            cmd.Connection = new OleDbConnection(db.GetConnection().ConnectionString);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "qryGetFirmwareByBoardID";
            cmd.Parameters.AddWithValue("@prodCode", boardID);
 
            OleDbDataAdapter da = new OleDbDataAdapter(cmd);
            DataTable dt = new DataTable();
            da.Fill(dt);
            return dt;
        }

Tags:

.NET | Access

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail

Calendar

<<  February 2018  >>
MoTuWeThFrSaSu
2930311234
567891011
12131415161718
19202122232425
2627281234
567891011

View posts in large calendar

Recent comments

Tags

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2018

Sign in