for (int i = 2; i <= x / i; i++)
if ((x % i) == 0) return false;
return true;
string sql = "UPDATE AGR SET SHORTNAME_AGR=\'" + dataGridView1.Rows[lastSelectedRowIndex].Cells[0].Value.ToString() + "\', NAME_AGR=\'" + dataGridView1.Rows[lastSelectedRowIndex].Cells[1].Value.ToString()+"\' " +
"WHERE ID_AGR=(select AGR.ID_AGR from AGR where AGR.SHORTNAME_AGR=\'"+lastSelectedRow+"\')";
declare
l_clob clob;
l_bfile bfile;
l_dest_offset number;
l_src_offset number;
l_lang_ctx number := 0; -- the default
l_warning number;
begin
l_bfile := bfilename('FILES_DIR', 'clob_col2.txt');
dbms_lob.createtemporary(l_clob, true);
l_dest_offset := 1; -- с начала
l_src_offset := 1; -- с начала
dbms_lob.fileopen(l_bfile);
dbms_lob.loadclobfromfile(
dest_lob => l_clob,
src_bfile => l_bfile,
amount => dbms_lob.lobmaxsize,
dest_offset => l_dest_offset,
src_offset => l_src_offset,
-- database csid by default or nls_charset_id('AL32UTF8')
bfile_csid => 0,
lang_context => l_lang_ctx,
warning => l_warning
);
dbms_lob.fileclose(l_bfile);
dbms_output.put_line(
'src_offset : ' || l_src_offset ||
'; dest_offset : ' || l_dest_offset ||
'; warning : ' || l_warning
);
dbms_lob.freetemporary(l_clob);
end;
/
src_offset : 1000010; dest_offset : 1000001; warning : 0
PL/SQL procedure successfully completed