Hi
I am trying to use Daper with an ODBC driver to an Informix Standard Engine
Database (needs must)
The odbc driver is Informix 3.5
Informix does not use named paramters, but uses ? as placeholders.
In addition our veriosn does not support VARCHAR.
Any how, I have got Daper working with Select, and Inserts with composed sql
strings, but want to use parameters to avoid potentai injection attacks etc.
Below is my code.
When using paramers I receive an error
ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.
private IDbConnection conn = new OdbcConnection(
ConfigurationManager.ConnectionStrings["test_connection"].ToString() );
public ActionResult Index()
{
string id = "SMI002";
var sql =
"INSERT INTO mjw_test (ten_ref) VALUES ( ? )";
conn.Execute(sql, new[] { new DbString{IsFixedLength=true, Value="1234" }});
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Draper 4.0
Windows 7
Thanks
Michael
Original issue reported on code.google.com by michaelw...@gmail.com on 12 Mar 2014 at 11:04
Original issue reported on code.google.com by
michaelw...@gmail.com
on 12 Mar 2014 at 11:04