Nein bei SAID handelt es sich um einen VarChar
> --- Ursprüngliche Nachricht --- > Von: Andreas Roth <[EMAIL PROTECTED]> > An: [email protected] > Betreff: Re: [Asp.net] Stored Procedure > Datum: Mon, 25 Jul 2005 10:15:40 +0200 > > [EMAIL PROTECTED] schrieb: > > Hallo, > > > > ich möchte gerne aus ASP (Programmiersprache VB) eine Stored Procedure > > aufrufen. Ich habe folgenden Code: > > > > > > Dim cmd As New System.Data.SqlClient.SqlCommand("Name", conDB) > > cmd.CommandType = CommandType.StoredProcedure > > cmd.Parameters.Add("SAID", Request("id")) > > > > Leider bekomme ich einen Fehler: > > > > Description: An unhandled exception occurred during the execution of the > > current web request. Please review the stack trace for more information > > about the error and where it originated in the code. > > > > Exception Details: System.InvalidCastException: Specified cast is not > valid. > > > > Danke > > > > Oli > > Ich vermute mal ganz stark, dass SAID ein Int oder ein anderer > Numerischer Typ ist, deshalb könnte es Notwendig sein den Request zu > casten: > cmd.Parameters.Add("SAID", Convert.ToInt32(Request("id"))) > > Gruss, Andreas > > > _______________________________________________ > Asp.net Mailingliste, Postings senden an: > [email protected] > An-/Abmeldung und Suchfunktion unter: > http://www.glengamoi.com/mailman/listinfo/asp.net > _______________________________________________ Asp.net Mailingliste, Postings senden an: [email protected] An-/Abmeldung und Suchfunktion unter: http://www.glengamoi.com/mailman/listinfo/asp.net
