none
Where is the databasename ? RRS feed

  • Question

  • I have this code:

     

    internal static List<BVLadeliste> SearchForOrdersToLadeliste(string XMLOrderNumbers)

    {

    List<BVLadeliste> retur = new List<BVLadeliste>();

    Database db = DatabaseFactory.CreateDatabase();

    string sqlCommand = "KSO.GetOrdresForLadeliste";

    DbCommand dbCmd = db.GetStoredProcCommand(sqlCommand);

    db.AddInParameter(dbCmd, "@OrderNumbers", DbType.String, XMLOrderNumbers);

    using (IDataReader dataReader = db.ExecuteReader(dbCmd))

    {

    while (dataReader.Read())

    {

    retur.Add(new BVLadeliste(dataReader));

    }

    }

    return retur;

    }

     

    And the application throughs an error in the underlaying code for

     

    Database db = DatabaseFactory.CreateDatabase();

     

    "Object reference not set to an instance of an object."

     

    What do I do wrong ?

     

    Best regards

    KSor, Denmark

     

    Tuesday, August 26, 2008 1:43 PM

All replies