And that's the result from my test with 3 consecutive blob updates (the file I used is 110.129.003 bytes):
Start: 1
Elapsed: 3"
Start: 2
Elapsed: 3"
Start: 3
Elapsed: 4"
Complete.
Follows the settings I did used to connect.
lnv_sqlca.DBMS = "ADO.Net"
lnv_sqlca.LogPass = '*********'
lnv_sqlca.LogId = "user"
lnv_sqlca.AutoCommit = False
lnv_sqlca.DBParm = "Namespace='System.Data.Odbc',DataSource='DSN'"
and the code I used to obtain previous result:
transaction lnv_sqlca
blob lbl_tmp
integer li_i, li_err
long ll_fileno
time lt_time1, lt_time2
lnv_sqlca = create transaction
lnv_sqlca.DBMS = "ADO.Net"
lnv_sqlca.LogPass = '*********'
lnv_sqlca.LogId = "user"
lnv_sqlca.AutoCommit = False
lnv_sqlca.DBParm = "Namespace='System.Data.Odbc',DataSource='DSN'"
connect using lnv_sqlca;
if lnv_sqlca.sqlcode <> 0 then
messagebox("Error", lnv_sqlca.sqlerrtext, stopsign!)
return
end if
ll_fileno = fileopen("C:\Downloads\SomeFile.zip", StreamMode!, read!, lockwrite!)
li_err = filereadex(ll_fileno, lbl_tmp)
fileclose(ll_fileno)
delete from dbo.contents2
using lnv_sqlca;
if lnv_sqlca.sqlcode <> 0 then
messagebox("Error", lnv_sqlca.sqlerrtext, stopsign!)
rollback using lnv_sqlca;
return
end if
commit using lnv_sqlca;
for li_i = 1 to 3
yield()
mle_log.text = mle_log.text + "Start: " + string(li_i) + "~r~n"
lt_time1 = time(now())
insert into dbo.contents2 (content_pid) values (:li_i)
using lnv_sqlca;
if lnv_sqlca.sqlcode <> 0 then
messagebox("Error", lnv_sqlca.sqlerrtext, stopsign!)
rollback using lnv_sqlca;
return
end if
updateblob dbo.contents2
set stored_content = :lbl_tmp
where content_pid = :li_i
using lnv_sqlca;
if lnv_sqlca.sqlcode <> 0 then
messagebox("Error", lnv_sqlca.sqlerrtext, stopsign!)
rollback using lnv_sqlca;
return
end if
commit using lnv_sqlca;
lt_time2 = time(now())
SecondsAfter (lt_time1, lt_time2)
mle_log.text = mle_log.text + "Elapsed: " + string(SecondsAfter (lt_time1, lt_time2)) + "~"~r~n"
next
mle_log.text = mle_log.text + "Complete.~r~n"
disconnect using lnv_sqlca;
So you can ask your developer to try something similar.
I can't say why ODBC is so slow.
Andreas.