[Gambas-user] pictures inside a DB

Benoit Minisini gambas at ...1...
Sat Mar 31 11:45:22 CEST 2007


On vendredi 30 mars 2007, Hamilton Geminiano Andrioli Junior wrote:
> Steven, i did what you said, but:
> 1. The first time was ok! My 33,6Kb picture was in DB
> 2. The second time, when i updated to a 56,8KB, there were just 8kb. Why?
> 3. I have to put 4 pictures inside this DB: Sales_man, Finan_man,
> Costumer_place, Costumer_job, every one has a 8kb picture...
>
> Problems?
> Please, help me. Here is my code:
>
>
>
> PUBLIC SUB Button5_Click()
> Mfunc.sData = file.load(label30.Text)
> mfunc.rs1 = mfunc.db.edit("clientes", "idclientes=&1", textbox3.text)
> mfunc.rs1!foto_compras = MFunc.sData
> mfunc.rs1.Update
> mfunc.db.Commit
> END
>
> PUBLIC SUB Button6_Click()
> Mfunc.sData = file.load(label31.Text)
> mfunc.rs2 = mfunc.db.edit("clientes", "idclientes=&1", textbox3.text)
> mfunc.rs2!foto_finan = MFunc.sData
> mfunc.rs2.Update
> mfunc.db.Commit
> END
>
> PUBLIC SUB Button9_Click()
> Mfunc.sData = file.load(label32.Text)
> mfunc.rs3 = mfunc.db.edit("clientes", "idclientes=&1", textbox3.text)
> mfunc.rs3!foto_fachada = MFunc.sData
> mfunc.rs3.Update
> mfunc.db.Commit
> END
>
> PUBLIC SUB Button11_Click()
> Mfunc.sData = file.load(label33.Text)
> mfunc.rs4 = mfunc.db.edit("clientes", "idclientes=&1", textbox3.text)
> mfunc.rs4!foto_socios = MFunc.sData
> mfunc.rs4.Update
> mfunc.db.Commit
> END
>
> Some thing wrong??????
>
> Steven Lobbezoo escreveu:

Which database drive do you use?

A remark: the Commit is useless, are you did not begin a transaction.

Regards,

-- 
Benoit Minisini




More information about the User mailing list