1

I'm currently trying to use Dapper rainbow as a wrapper for my Firebird database.

The problem is that it seems to be generating SQL for a different type of DB.

The SQL generated is:

select 1 from INFORMATION_SCHEMA.TABLES where TABLE_NAME = @name

Which is causing a "Dynamic SQL error" from Firebird since Firebird doesn't have an INFORMATION_SCHEMA.

Here is my code:

public class USERI{
    public string ID { get; set;}
    public string Name {get; set;}
}

public class DB : Database<DB> {
    public Table<USERI> users { get; set; }
    }

class Program {
    static void Main(string[] args) {
        string connString = String.Format(@"DataSource=localhost;Database={0};
                                    User Id=SYSDBA;Password=masterkey", dbLocation);

        var db = DB.Init(new FbConnection(connString), commandTimeout: 2);
        var users = db.users.First();

    }
}

I have used normal Dapper queries on my DB and it was succesful. How can I make the DB wrapper in Rainbow be aware of the DB type?

Amit Joshi
  • 15,448
  • 21
  • 77
  • 141
Syneri
  • 43
  • 5
  • Looking at [its code](https://github.com/StackExchange/dapper-dot-net/blob/master/Dapper.Rainbow/Database.cs) and the SQL dialect it uses, Dapper Rainbow assumes you are using it with SQL Server. It doesn't seem to have support for other databases. – Mark Rotteveel Aug 19 '15 at 12:44
  • I didn't think to look in its code, since I thought if Dapper worked with Firebird so will Rainbow. – Syneri Aug 19 '15 at 12:54

0 Answers0