Thanks Jiri!

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf
> Of Jiri Cincura
> Sent: Wednesday, March 05, 2008 2:55 PM
> To: For users and developers of the Firebird .NET providers
> Subject: Re: [Firebird-net-provider] I get error using FbScript and
> FbBatchExecution
> 
> On 3/5/08, Mercea Paul <[EMAIL PROTECTED]> wrote:
> >  is readed as : "CREATE OR ALTER PROCEDURE SELECT_DATA (\r\n
> TIPUNIT
> >  CHAR(1),\r\n    DATAINT DATE)\r\nRETURNS (\r\n   DATADOC
> >  DATE)\r\nAS\r\nbegin\r\nend"
> 
> It's OK. There's no problem with \r\n, it's displayed in debugger, but
> these "chars" are not sent to DB.
> 
> >  Parsing this statement, FbScript.Parse consider this as valid
> statement.This
> >  statement generate error in both cases, FBCommand or
> FbBatchExecution. If I
> >  write the statement without "\r\n" is executed in both cases.
> 
> I wrote this code:
> conn.Open();
>                 using (FbCommand cmd = conn.CreateCommand())
>                 {
>                     cmd.CommandText = "CREATE OR ALTER PROCEDURE
> SELECT_DATA (\r\n    TIPUNIT CHAR(1),\r\n    DATAINT DATE)\r\nRETURNS
> (\r\n   DATADOC DATE)\r\nAS\r\nbegin\r\nend";
>                     cmd.ExecuteNonQuery();
>                 }
> with directly typed in "\r\n" and it's executed without any problem.
> I'm 100% sure, that any line ends etc. cannot impress the command
> execution.
> 
> >  Same problem is about double quoted fileds as :
> >  CREATE TABLE TEST (
> >     ID     INT
> >     "MyName" VarChar(50)...
> >  The "MyName" field will generate error.Reading sql file is a string
> like:
> >  "CREATE TABLE TEST (\r\n    ID     INT\r\n    \"MyName\"
> VarChar(50)\r\n
> >  ...."
> 
> Same. The \" is only in debugger. It's not in real string.
> 
> >  Are you sure the problem is on server side? I have tested with
> FB1.5.4 and
> >  FB 2.0.3 and FB 2.1...Delphi work, C# generate error!
> 
> I think, you have problem on both sides. AFAIR you're working in
> dialect 1, so this gives you some problems. And you have also some
> problems in your C# code, but I'm pretty sure, that's not provider's
> issue. :)
> 
> --
> Jiri {x2} Cincura (CTO x2develop)
> http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com
> 
> -----------------------------------------------------------------------
> --
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Firebird-net-provider mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to