Click here to Skip to main content
15,881,092 members
Home / Discussions / Database
   

Database

 
GeneralRe: VB.NET MYSQL loop through records while adding Pin
Pauls Pauls13-Apr-15 20:09
Pauls Pauls13-Apr-15 20:09 
GeneralRe: VB.NET MYSQL loop through records while adding Pin
Mycroft Holmes13-Apr-15 20:39
professionalMycroft Holmes13-Apr-15 20:39 
GeneralRe: VB.NET MYSQL loop through records while adding Pin
Pauls Pauls14-Apr-15 1:47
Pauls Pauls14-Apr-15 1:47 
QuestionPICTUREBOX IMAGE IN VB.NET Pin
Pauls Pauls13-Apr-15 0:18
Pauls Pauls13-Apr-15 0:18 
AnswerRe: PICTUREBOX IMAGE IN VB.NET Pin
Corporal Agarn13-Apr-15 0:35
professionalCorporal Agarn13-Apr-15 0:35 
QuestionSystem.Data.SqlClient.SqlException: Procedure or function 'StaffSearch_sel' expects parameter '@TotalRows', which was not supplied. Pin
indian1437-Apr-15 15:22
indian1437-Apr-15 15:22 
AnswerRe: System.Data.SqlClient.SqlException: Procedure or function 'StaffSearch_sel' expects parameter '@TotalRows', which was not supplied. Pin
Sascha Lefèvre7-Apr-15 16:42
professionalSascha Lefèvre7-Apr-15 16:42 
GeneralRe: System.Data.SqlClient.SqlException: Procedure or function 'StaffSearch_sel' expects parameter '@TotalRows', which was not supplied. Pin
indian1437-Apr-15 19:59
indian1437-Apr-15 19:59 
Even after putting @ also it was giving me error then I tried with this.

I have put it like this
List<StaffMemberPOCO> pocos =
    context.ExecuteStoreQuery<StaffMemberPOCO>("exec StaffSearch_sel @OverrideSecurity, @UserId, @SchoolYearId, @Name, @ContractorId, @SubcontractorId, @SiteId, @OrganizationRelationshipIds, @RoleTypeIds, @StaffMemberNeedsAllRoles",
            new SqlParameter("@OverrideSecurity", overrideSecurity),
            new SqlParameter("@UserId", userId),
            new SqlParameter("@SchoolYearId", schoolYearId),
            new SqlParameter("@Name", name ?? (object)DBNull.Value),
            new SqlParameter("@ContractorId", contractorId ?? (object)DBNull.Value),
            new SqlParameter("@SubcontractorId", subcontractor ?? (object)DBNull.Value),
            new SqlParameter("@SiteId", siteId ?? (object)DBNull.Value),
            new SqlParameter("@OrganizationRelationshipIds", organizationRelationshipIds == null || organizationRelationshipIds.Count() == 0 ? (object)DBNull.Value : string.Join(",", organizationRelationshipIds)),
            new SqlParameter("@RoleTypeIds", roleTypeIds == null ? (object)DBNull.Value : string.Join(",", roleTypeIds)),
            new SqlParameter("@StaffMemberNeedsAllRoles", staffMemberNeedsAllRoles),
            new SqlParameter("@Page", pageNumber),
            new SqlParameter("@RowsPerPage", rowsPerPage),
            //outputParm,
            new SqlParameter("@TotalRows", SqlDbType.Int) { Direction = ParameterDirection.Output },
            new SqlParameter("@SortExpression", sortExpression ?? (object)DBNull.Value),
            new SqlParameter("@SortDirection", sortDirection ?? (object)DBNull.Value)
            ).ToList();

totalRows = ((outputParm != null) && !DBNull.Value.Equals(outputParm)) ? int.Parse(outputParm.Value.ToString()) : 0;

And still giving the following error
Procedure or function 'StaffSearch_sel' expects parameter '@TotalRows', which was not supplied.
"There is enough hatred in the world, lets spread love compassion and affection."


modified 8-Apr-15 2:25am.

GeneralRe: System.Data.SqlClient.SqlException: Procedure or function 'StaffSearch_sel' expects parameter '@TotalRows', which was not supplied. Pin
Sascha Lefèvre7-Apr-15 20:54
professionalSascha Lefèvre7-Apr-15 20:54 
QuestionA data source instance has not been supplied for the data source Pin
indian1436-Apr-15 12:55
indian1436-Apr-15 12:55 
QuestionHow Do I Insert Only Recently Updated Row From Table1 To 2 in MySQL Pin
RevathySanthanam2-Apr-15 4:10
RevathySanthanam2-Apr-15 4:10 
Rant[REPOST] How Do I Insert Only Recently Updated Row From Table1 To 2 in MySQL Pin
Richard Deeming2-Apr-15 4:41
mveRichard Deeming2-Apr-15 4:41 
Questionmultiple joins, works in sql manager but not in asp.net Pin
jkirkerx1-Apr-15 12:47
professionaljkirkerx1-Apr-15 12:47 
Answer[solved] Pin
jkirkerx1-Apr-15 13:02
professionaljkirkerx1-Apr-15 13:02 
SuggestionRe: multiple joins, works in sql manager but not in asp.net Pin
Richard Deeming2-Apr-15 2:30
mveRichard Deeming2-Apr-15 2:30 
GeneralRe: multiple joins, works in sql manager but not in asp.net Pin
jkirkerx2-Apr-15 12:09
professionaljkirkerx2-Apr-15 12:09 
Questionimage in database Pin
vinay dahiya1-Apr-15 11:40
vinay dahiya1-Apr-15 11:40 
GeneralRe: image in database Pin
PIEBALDconsult1-Apr-15 12:08
mvePIEBALDconsult1-Apr-15 12:08 
GeneralRe: image in database Pin
vinay dahiya1-Apr-15 12:15
vinay dahiya1-Apr-15 12:15 
GeneralRe: image in database Pin
PIEBALDconsult1-Apr-15 12:22
mvePIEBALDconsult1-Apr-15 12:22 
GeneralRe: image in database Pin
vinay dahiya1-Apr-15 12:59
vinay dahiya1-Apr-15 12:59 
GeneralRe: image in database Pin
Richard MacCutchan1-Apr-15 21:22
mveRichard MacCutchan1-Apr-15 21:22 
GeneralRe: image in database Pin
vinay dahiya2-Apr-15 1:59
vinay dahiya2-Apr-15 1:59 
GeneralRe: image in database Pin
Richard MacCutchan2-Apr-15 2:38
mveRichard MacCutchan2-Apr-15 2:38 
GeneralRe: image in database Pin
vinay dahiya2-Apr-15 2:44
vinay dahiya2-Apr-15 2:44 

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.