General information
Category:
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);
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only