From: Carlos G.A. <car...@te...> - 2004-02-10 20:27:53
|
El mar, 10-02-2004 a las 10:46, Dumitru Popescu escribi=C3=B3: > 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 >=20 > HERE IS THE CODE THAT I'M USING >=20 > private static void > CreateDatabase(string connectionString) > { > Hashtable values =3D new > Hashtable(); >=20 > values.Add("DataSource" , > =20 > ConfigurationSettings.AppSettings["DataSource"]); > values.Add("Database" , > =20 > ConfigurationSettings.AppSettings["Database"]); > values.Add("Port" =20 > , > =20 > Convert.ToInt32(ConfigurationSettings.AppSettings["Port"])); > values.Add("User" =20 > , > =20 > ConfigurationSettings.AppSettings["User"]); > values.Add("Password" , > =20 > ConfigurationSettings.AppSettings["Password"]); > values.Add("Dialect" , > =20 > Convert.ToByte(ConfigurationSettings.AppSettings["Dialect"])); > values.Add("ForcedWrite", > =20 > Convert.ToBoolean(ConfigurationSettings.AppSettings["ForcedWrite"])); > values.Add("Charset" , > =20 > ConfigurationSettings.AppSettings["Charset"]); >=20 > foreach (DictionaryEntry v in > values) > { > =20 > Console.WriteLine("{0}=3D{1};", v.Key.ToString(), > v.Value.ToString()); > } >=20 > =20 > FbConnection.CreateDatabase(values); > } >=20 > HERE IS OUTPUT >=20 > PageSize=3D4096; > DataSource=3Dlocalhost; > User=3DSYSDBA; > Database=3D/root/testdb.gdb; > Dialect=3D3; > Password=3DUjswO8K6; > ForcedWrite=3DFalse; > Port=3D3050; > Charset=3DISO8859_1; >=20 > 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 --- >=20 > in <0x0088a> > FirebirdSql.Data.Firebird.FbConnection:CreateDatabase > (System.Collections.Hashtable) > in <0x0052a> .Test:CreateDatabase (string) > in <0x00044> .Test:Main (string[]) >=20 >=20 > __________________________________ > Do you Yahoo!? > Yahoo! Finance: Get your refund fast by filing online. > http://taxes.yahoo.com/filing.html >=20 >=20 > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |