From: Mike S. <mi...@mi...> - 2003-04-10 09:16:17
|
Hi Carlos The problem is that you cannot send a statement to create a trigger or other stored procedure because the separator used by the stored proc code is a semi-colon. Interbase has for years allowed you to change the separator with the SET TERM statement. If you can't do that, then you can't create or edit stored procs. I'm using the latest sources checked out this afternoon using CVS, including the static CreateDatabase() method & rebuilt with NAnt. Cheers, Mike. -----Original Message----- From: Carlos Guzman Alvarez [mailto:car...@te...] Sent: 09 April 2003 18:23 To: Mike Scott; Firebird .Net Provider Subject: Re: [Firebird-net-provider] Re: How to CREATE DATABASE using .Net FB Provider Hello: > When I try using the code you sent without change, I get the following > exception on reader.Close(): > > FbException: Dynamic SQL Error > SQL error code = -501 > Attempt to reclose a closed cursor > > Also none of the domains get created. It's working well for me, Are you testing it with CVS sources ??, i have made today some changes to batch statements. > Can you get the following to work: > > SET TERM ^ ; > SET TERM ; ^ > > If you can get SET TERM to work, we can execute each command individually. > > Currently, we have worked around the problem by writing a DLL that uses a > Delphi library (IBObjects) to run SQL scripts and calling that from C#.Net > using P/Invoke :-( > > It's far from ideal - I could send you a sample script including creating a > domain, a table and a trigger (including SET TERM) and if you can get that > to run, then ANY script should work. Until then, only standard SQL stuff > seems to work and that means we can't run a proper DB creation script :-( No, but i think you will get on problems with this, because batch updates needs to use ; as separator. Please if you can send .net provider questions to the developement list: fir...@li... -- Best regards Carlos Guzmán Álvarez Vigo-Spain |