To create a table:
-----------------------------
    int iTablesCount = liststTableNames.Count();
    try {
        string stOpenConn = new FbConnectionStringBuilder {
            Database = stPathFilename,
            UserID = stUserID,
            Password = stPassword,
            ServerType = FbServerType.Embedded,
            ClientLibrary = stCLIENT_LIBRARY
        }.ToString();
        FbConnection fbConn = new FbConnection(stOpenConn);
        fbConn.Open();

        FbTransaction fbTransaction = fbConn.BeginTransaction();
        for (int ii = 0; ii < iTablesCount; ii++) {
            string stSql = "CREATE TABLE " + liststTableNames[ii] + "(
" + liststFieldDefinitions[ii] + ")";
            FbCommand fbCmd = new FbCommand(stSql, fbConn, fbTransaction);
            fbCmd.ExecuteNonQuery();
        }
        fbTransaction.Commit();
-----------------------------
where stSql = "CREATE TABLE  TableOrg (  fstPriority VARCHAR(10),
fstInfo VARCHAR(100), fiKeyID INTEGER PRIMARY KEY )".

1) Is it correct to have multiple fbCmd.ExecuteNonQuery() commands ...
followed by one fbTransaction.Commit()?

2) I want to be able to handle German vowels, such as umlauts, for
fstInfo.  I don't think VARCHAR is the correct choice as it is
non-unicode.

3) I also want variable lengths, without a max, for fstInfo.  What do
I use in place of the "100"?

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to