Click here to Skip to main content
15,922,574 members
Home / Discussions / C#
   

C#

 
QuestionBiztalk 2004: How to pass database facts from C# code? Pin
pankazmittal21-Jun-06 10:25
pankazmittal21-Jun-06 10:25 
QuestionSQL Express 2005 Dumper for SQL Server 2005 Pin
emran83421-Jun-06 10:14
emran83421-Jun-06 10:14 
AnswerRe: SQL Express 2005 Dumper for SQL Server 2005 Pin
Mark Tutt21-Jun-06 10:50
Mark Tutt21-Jun-06 10:50 
QuestionData Adapter passing by reference to stored procedure Pin
leckey21-Jun-06 9:07
leckey21-Jun-06 9:07 
AnswerRe: Data Adapter passing by reference to stored procedure Pin
Not Active21-Jun-06 9:25
mentorNot Active21-Jun-06 9:25 
GeneralRe: Data Adapter passing by reference to stored procedure [modified] Pin
leckey21-Jun-06 9:28
leckey21-Jun-06 9:28 
GeneralRe: Data Adapter passing by reference to stored procedure Pin
ashishinfra21-Jun-06 20:07
ashishinfra21-Jun-06 20:07 
AnswerRe: Data Adapter passing by reference to stored procedure Pin
Josh Smith21-Jun-06 9:43
Josh Smith21-Jun-06 9:43 
The saga continues. Smile | :)

Your post is a bit misleading. Your call to ExecuteDataset looks like this:
ds= SqlHelper.ExecuteDataset(this.connectionString, "dbo.GetPartInfo", "@PartID");


But the method signature looks like this:

public static DataSet ExecuteDataset(string connectionString, CommandType commandType, string commandText, params SqlParameter[] commandParameters)


You are not calling the method whose signature you displayed. Notice that you are not passing a CommandType value. If you were to pass CommandType.StoredProcedure, that might help. But, a more immediate error/oversight is that you are not actually passing SqlParameter objects! Your "@PartID" argument is a string, not an SqlParameter object. You need to create a new SqlParameter and pass it the "@PartID" value as it's name. Pass that object into the ExecuteDataset method.

Josh
GeneralRe: Data Adapter passing by reference to stored procedure Pin
leckey21-Jun-06 9:47
leckey21-Jun-06 9:47 
GeneralRe: Data Adapter passing by reference to stored procedure Pin
Josh Smith21-Jun-06 10:06
Josh Smith21-Jun-06 10:06 
GeneralRe: Data Adapter passing by reference to stored procedure Pin
leckey21-Jun-06 10:17
leckey21-Jun-06 10:17 
GeneralRe: Data Adapter passing by reference to stored procedure Pin
Josh Smith21-Jun-06 10:25
Josh Smith21-Jun-06 10:25 
GeneralRe: Data Adapter passing by reference to stored procedure Pin
leckey21-Jun-06 10:39
leckey21-Jun-06 10:39 
GeneralRe: Data Adapter passing by reference to stored procedure Pin
Josh Smith21-Jun-06 10:44
Josh Smith21-Jun-06 10:44 
QuestionPaint Event Handler Pin
ZeAugusto21-Jun-06 7:23
ZeAugusto21-Jun-06 7:23 
AnswerRe: Paint Event Handler Pin
Josh Smith21-Jun-06 7:25
Josh Smith21-Jun-06 7:25 
GeneralRe: Paint Event Handler Pin
ZeAugusto21-Jun-06 7:42
ZeAugusto21-Jun-06 7:42 
GeneralRe: Paint Event Handler [modified] Pin
led mike21-Jun-06 8:01
led mike21-Jun-06 8:01 
GeneralRe: Paint Event Handler Pin
Josh Smith21-Jun-06 8:06
Josh Smith21-Jun-06 8:06 
GeneralRe: Paint Event Handler Pin
Jun Du21-Jun-06 9:05
Jun Du21-Jun-06 9:05 
GeneralRe: Paint Event Handler Pin
ZeAugusto21-Jun-06 12:05
ZeAugusto21-Jun-06 12:05 
GeneralRe: Paint Event Handler Pin
Jun Du22-Jun-06 4:27
Jun Du22-Jun-06 4:27 
AnswerRe: Paint Event Handler Pin
led mike21-Jun-06 7:28
led mike21-Jun-06 7:28 
QuestionOpacity Control Pin
Cubzfan21-Jun-06 6:57
Cubzfan21-Jun-06 6:57 
AnswerRe: Opacity Control Pin
led mike21-Jun-06 7:27
led mike21-Jun-06 7:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.