internal static extern OdbcReturnCode SQLExecDirectW(OdbcStatementHandle statementHandle, [In, MarshalAs(UnmanagedType.LPWStr)] string statementText, int textLength);
internal static void ExecuteDirect(OdbcStatementHandle statementHandle, string commandText) { if (commandText == null) throw new ArgumentNullException("commandText"); var result = NativeMethods.SQLExecDirectW(statementHandle, commandText, commandText.Length); if ((result == OdbcReturnCode.Success) || (result == OdbcReturnCode.SuccessWithInfo)) return; var ex = GetException(statementHandle, "Unable to execute command text."); throw ex; }