From: Dumitru P. <pop...@ya...> - 2004-02-10 09:46:24
|
I have tried FbConnection.CreateDatabase in a small c# code on redhat 9.0 and mono 0.30 and got an error I there a bug or is something wrong in my code HERE IS THE CODE THAT I'M USING private static void CreateDatabase(string connectionString) { Hashtable values = new Hashtable(); values.Add("DataSource" , ConfigurationSettings.AppSettings["DataSource"]); values.Add("Database" , ConfigurationSettings.AppSettings["Database"]); values.Add("Port" , Convert.ToInt32(ConfigurationSettings.AppSettings["Port"])); values.Add("User" , ConfigurationSettings.AppSettings["User"]); values.Add("Password" , ConfigurationSettings.AppSettings["Password"]); values.Add("Dialect" , Convert.ToByte(ConfigurationSettings.AppSettings["Dialect"])); values.Add("ForcedWrite", Convert.ToBoolean(ConfigurationSettings.AppSettings["ForcedWrite"])); values.Add("Charset" , ConfigurationSettings.AppSettings["Charset"]); foreach (DictionaryEntry v in values) { Console.WriteLine("{0}={1};", v.Key.ToString(), v.Value.ToString()); } FbConnection.CreateDatabase(values); } HERE IS OUTPUT PageSize=4096; DataSource=localhost; User=SYSDBA; Database=/root/testdb.gdb; Dialect=3; Password=UjswO8K6; ForcedWrite=False; Port=3050; Charset=ISO8859_1; Unhandled Exception: FirebirdSql.Data.Firebird.FbException: No message for code 24 found. No message for code 413 found. ---> FirebirdSql.Data.Firebird.Gds.GdsException: Exception of type FirebirdSql.Data.Firebird.Gds.GdsException was thrown. in <0x001c3> FirebirdSql.Data.Firebird.Gds.GdsDbAttachment:CreateDatabase (FirebirdSql.Data.Firebird.Gds.GdsAttachParams,FirebirdSql.Data.Firebird.Gds.GdsDpbBuffer) in <0x00824> FirebirdSql.Data.Firebird.FbConnection:CreateDatabase (System.Collections.Hashtable) --- End of inner exception stack trace --- in <0x0088a> FirebirdSql.Data.Firebird.FbConnection:CreateDatabase (System.Collections.Hashtable) in <0x0052a> .Test:CreateDatabase (string) in <0x00044> .Test:Main (string[]) __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html |