Hi there.
I'm using the DAAB in my app.
So, if I need to fill a dataset, using a SQL Server database, I use the
following code
helper.FillDataset(conn, "GetCustomersByID", ds, new string[] {
"Customers" }, new string[] { "ALFKI" });
Parameters:
conn = Connection
GetCustomersById = stored procedure name
ds = the dataset for fill
new string[] {"Customers"} = the table name
new string[] {"ALFKI"} = the id parameter for stored procesure search.
If I want to use Access database, how can I will do?
I will need to put if's in everywhere, like:
if (SqlServer)
helper.FillDataset(cs, "GetCustomersByID", ds, new string[] {
"Customers" }, new string[] { "ALFKI" });
if (Access)
helper.FillDataset(cs, CommandType.Text, "SELECT * FROM Customers WHERE
CustomerID = 'ALFKI'", ds, new string[] { "Customers" });
It seems insane for me!
Someone has another idea or got the same problem?
Tks.
Fernando