Good day.

I use the Firebird 2.5 server and Visual Studio 2005, the C # language. There is a task to create a database programmatically.

I apply the following construction:

FbConnectionStringBuilder connectString = new FbConnectionStringBuilder(); connectString.Database = myPath; connectString.Dialect = 3; connectString.UserID = "SYSDBA"; connectString.Password = "my_pass"; connectString.Charset = "win1251"; FbConnection.CreateDatabase(connectString.ConnectionString, 8192, false, false); 

By itself, the code is working, creating a database. But the problem is that the base is always created with the default value page_size = 4096, although I am passing the value 8192 to the method. Please tell me the possible cause of the error.

    1 answer 1

    In the original tutorial, the first parameter for the CreateDatabase method is used on the ConnectionString property, and the string obtained by the ToString () method. Maybe this is the problem7

    • Tomorrow at work I'll check, it can help. thank. if someone has other ideas, I will be glad, suddenly they will come in handy. - TabakovAleksey
    • No, unfortunately, did not help. I think the error is not even in the code ... I have installed .Net 4.0. And maybe the reason for the error is that I connect the FirebirdSql.Data.FirebirdClient.dll version 2.1 library to the project, because the CreateDatabase method appeared only in Firebird 2.5 (if not mistaken)? - TabakovAleksey
    • Yes exactly. I checked the same code in another project, it uses FirebirdSql.Data.FirebirdClient.dll version 2.7, everything worked correctly. - TabakovAleksey
    • @TabakovAleksey, weird you. The server of one version, the library of another :) I would also not know what to create in this case. - Drac5
    • Yes, just before the project worked with the server version 2.1. Six months ago, they switched to 2.5. Then I tried to update the library, but I saw that in many modules I would have to make changes, some function from 2.1 was not supported there. Did not waste time, and left the old one. - TabakovAleksey