Ok, this bug has been bugging me long enough. What happens is that there's a dynamic let block that looks like this: (eval `(let ((,param-var ',rem-params)) (sql-product-interactive ',sql-product ',new-name)))) Here's the code that sets param-var: (setq param-var (sql-get-product-feature sql-product :sqli-login nil t)) It uses global variable sql-product. The default sql-product is ansi and running the above for it results in nil. Running "(let ((nil ..." leads to this error. In the same function there is a block that sets it to a proper value based on the current connection, but it is executed after param-var is already set. That's why the second time works. I've attached a simple patch that just reorders code within sql-connect. -- Best Regards, Nikolay Kudryavtsev