Error that I get:
ERROR [42000] [Microsoft][ODBC Text Driver] Undefined function 'REPLICATE' in expression.
Code below:
DataTable dt = new DataTable();
string tempPath = @"C:\swd\";
string strConn = @"Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=" + tempPath + @";Extensions=csv,txt";
string SqlString = "Select RIGHT(REPLICATE('0', 10) + RowNr, 10),"
+ "RIGHT(REPLICATE('0', 10) + last_batch_number, 10) from Book1.csv";
OdbcConnection conn = new OdbcConnection(strConn);
OdbcDataAdapter da = new OdbcDataAdapter(SqlString, conn);
conn.Open();
da.Fill(dt);
conn.Close();
Thanks