From: Yvan P. <yva...@co...> - 2006-04-18 15:11:41
|
Hello Charles, I could not give you any advise on your current problem because I just start to use VS C# !!! However looking at the archived mails, I have notice that you had the same problem I am facing now. After installation of the Firebird .NET provider I get the following message when I try to introduce a new connection with the Visual Studio wizard: "Failure has occured while loading a type" I could not find how you have solved that problem into the mails archive. Could you please help me ? Regards Yvan -----Original Message----- From: fir...@li... [mailto:fir...@li...]On Behalf Of Charles Urbina Sent: 18 April 2006 16:57 To: fir...@li... Subject: [Firebird-net-provider] Executing Procedure Error Help Please! Hello everyone! I'm using version 2 RC1 of the .NET FB Provider and VS 2005 I'm trying to execute a procedure but i get an error. (please see below) my stored procedure need to return a parameter. I have taking off the return parameter from the stored procedure because I thoght that was the cause of the error but the problem is the same. Tia Charles --------------- Error ----------------------- Exception of type 'FirebirdSql.Data.Common.IscException' was thrown. 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: FirebirdSql.Data.Common.IscException: Exception of type 'FirebirdSql.Data.Common.IscException' was thrown. Source Error: Line 152: Line 153: // Execute Update Line 154: myCommand.ExecuteNonQuery(); Line 155: Line 156: // Commit changes Source File: c:\2005 Projects\Star Net Limo\StarsLimoWebSite\Reservations.aspx.cs Line: 154 Stack Trace: [IscException: Exception of type 'FirebirdSql.Data.Common.IscException' was thrown.] FirebirdSql.Data.Client.Gds.GdsConnection.ReadStatusVector() +866 FirebirdSql.Data.Client.Gds.GdsConnection.ReadResponse() +107 FirebirdSql.Data.Client.Gds.GdsDatabase.ReadResponse() +14 FirebirdSql.Data.Client.Gds.GdsStatement.Prepare(String commandText) +247 FirebirdSql.Data.FirebirdClient.FbCommand.Prepare(Boolean returnsSet) +309 FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior behavior, Boolean returnsSet) +17 FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery() +53 [FbException (0x80004005): Dynamic SQL Error parameter mismatch for procedure INSERT_RESERVATION] FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery() +127 Reservations.ASPxButton4_Click(Object sender, EventArgs e) in c:\2005 Projects\Star Net Limo\StarsLimoWebSite\Reservations.aspx.cs:154 DevExpress.Web.ASPxDataControls.ASPxButton.OnClick(EventArgs e) +75 DevExpress.Web.ASPxDataControls.ASPxButton.System.Web.UI.IPostBackEventHa ndler.RaisePostBackEvent(String eventArgument) +284 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +172 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4920 ---------------------------------------------------------------------------- -- Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 ---------------------------------------------- ------------------------- My Code ------------------------ protected void ASPxButton4_Click(object sender, EventArgs e) { string connectionString ="Database=C:\\2005 Projects\\Star Net Limo\\Database\\STARSNETLIMO.FDB;" + "User=SYSDBA;" + "Password=masterkey;" + "Dialect=3;" + "Server=localhost"; FbTransaction myTransaction; FbConnection myConnection = new FbConnection(connectionString); myConnection.Open(); myTransaction = myConnection.BeginTransaction(); FbCommand myCommand = new FbCommand("EXECUTE PROCEDURE INSERT_RESERVATION", myConnection, myTransaction); myCommand.Parameters.Add("@COMPANY_NAME", FbDbType.VarChar, 100, "COMPANY_NAME").Direction = ParameterDirection.Input; myCommand.Parameters.Add("@PASSENGER_NAME", FbDbType.VarChar, 100, "PASSENGER_NAME").Direction = ParameterDirection.Input; myCommand.Parameters[0].Value = txCompanyName.Text; myCommand.Parameters[1].Value = txPassengerName.Text; // Execute Update myCommand.ExecuteNonQuery(); // Commit changes myTransaction.Commit(); // Free command resources in Firebird Server myCommand.Dispose(); // Close connection myConnection.Close(); } --------------------------------------------------------------- ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Firebird-net-provider mailing list Fir...@li... https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |