D
David
Hi,
This is causing me a few problems as I am not sure how to handle this...
I have a data access layer. My layer is built in such a way that I can use
any database type I choose, such as SQL Server, MySQL etc.
Now, in my layer, I have all my SQL statements and use parameterised
queries. An example of a parameter is...
cmd = DL.CreateCommand(sql, conn);
param = DL.CreateDataParameter();
param.ParameterName = "@DomainName";
param.DbType = DbType.String;
param.Value = DomainName;
cmd.Parameters.Add(param);
(DL is the data layer)
What I would like to do somehow is to call a function and pass the values,
but I am not sure how the function should be constructed.
I want to be able to call it something like...
param = BuildParam("@DomainName", DbType.String, ValueString).
The reason being is my Datalayer is getting quite big now, much of the space
is taken by declaring my parameters like what is shown.
Any help would be appreciated.
BTW. Thanks Alexei, the keys in my web.config to allow authentication across
applications worked great.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
This is causing me a few problems as I am not sure how to handle this...
I have a data access layer. My layer is built in such a way that I can use
any database type I choose, such as SQL Server, MySQL etc.
Now, in my layer, I have all my SQL statements and use parameterised
queries. An example of a parameter is...
cmd = DL.CreateCommand(sql, conn);
param = DL.CreateDataParameter();
param.ParameterName = "@DomainName";
param.DbType = DbType.String;
param.Value = DomainName;
cmd.Parameters.Add(param);
(DL is the data layer)
What I would like to do somehow is to call a function and pass the values,
but I am not sure how the function should be constructed.
I want to be able to call it something like...
param = BuildParam("@DomainName", DbType.String, ValueString).
The reason being is my Datalayer is getting quite big now, much of the space
is taken by declaring my parameters like what is shown.
Any help would be appreciated.
BTW. Thanks Alexei, the keys in my web.config to allow authentication across
applications worked great.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available