We're developing a site that uses .NET2.0 and ASA9. While developing, everything works fine. When we move the assemblies from our development PCs to the test server, which is attached to the same ASA dbserver that I use when developing, I get the following error message when attempting to access the database:
The SelectCommand.Connection property has not been initialized before calling 'Fill'.
This application is also using SQL2005 without any problem.
Here's the code:
public static DataSet StateByCode(string sCS, string sCode, out int iRowsAffected)
using (DataSet dataSet = new DataSet())
using (AsaConnection con = new AsaConnection(sCS))//Returns a new AsaConnection object.
using (AsaDataAdapter adapter = new AsaDataAdapter())
using (AsaCommand cmd = new AsaCommand("usp_LMW_DDL_StateByCode"))
cmd.CommandType = CommandType.StoredProcedure;
AsaParameter parm = new AsaParameter("@code", AsaDbType.VarChar, 6);
parm.Value = sCode;