|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
newbie really needs help with ado.net access [C# 05]Im a selftaught C# programmer. I have a hotel management project to do, and i'm stuck! In One of my classes, called data! =S , from my project i initilize vars like this: public Data(string databaseURL , string xmlURL) { con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + databaseURL); resAdapter = new OleDbDataAdapter( "SELECT * FROM customers WHERE ? BETWEEN fromDate And to", con); resAdapter.SelectCommand.Parameters.Add("?", OleDbType.Date); resCmdBuilder = new OleDbCommandBuilder(resAdapter); myDataSet = new DataSet(); } So , now i have a unbound datagridview i need to fill , i have a fill() function in this same class which takes a dgv [Fill(DataGridView theDgv) ] and fills it based on myDataSet. The adapter loads like this : resAdapter.SelectCommand.Parameters[0].Value = theDay;Now: 1. The datatset has customers based on the top SQl statement , how do i load into it customers based on other values , or just ALL customers??! ("SELECT * FROM customers)?? load resAdapter again!?? 2. How do i MAKE a NEW table in an access database???(i know how to add and delete columns in a table) 3. I have to have a bills table with ALL BILLS , how do i link them to a customer (customers have a customerID) Thanks Gideon |
|||||||||||||||||||||||