Information générale
Catégorie:
The Mere Mortals .NET Framework
I'm trying to build a method in my bizobj that returns the primary key of a SQL table. The code below is what I'm using to call the sp_pkeys stored proc to get the info I need. The problem is that this returns no records back, even though I can execute the same command with the same parameters from Query Analyzer and get back the expected results. Can someone tell me what might be wrong with this code - or is there a better approach?
mmDataAccessBase dao = this.GetDataAccessObject();
IDbDataParameter[] spParams = new IDbDataParameter[1];
spParams[0] = dao.CreateParameter("@table_name", this.TableName);
DataSet dsPrimaryKeys = new DataSet();
dao.FillDataSet(dsPrimaryKeys, "sp_pkeys", "keys", System.Data.CommandType.StoredProcedure, spParams, true);
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement