1. Yeng Thao
  2. as SQLite DB Server
  3. 火, 2月 23 2021, 08:19 PM
  4.  メールで購読
Hi all,

I'm currently learning this new application call XOJO and trying to write a blob to the sqlite database on the valentina server, but I'm getting an error for unknown. If the sqlite is not in the valentina server it writes perfectly fine.

Here is the code I'm using.

Var row As New DatabaseRow
row.Column("ID";).IntegerValue = Val(IDField.Text)
row.Column("Name";).StringValue = NameField.Text
row.Column("Pic";).BlobValue = PictureCanvas.Backdrop.ToData(Picture.Formats.PNG)

mDatabase.AddRow("Person", row)

when I execute a button to run this code it will get stuck at the AddRow with unknown error. If I remove the Blob and run the code it will save it perfectly fine into the table. I tried following the valentina document for the blob write, but it gives me a bunch of error (unless I'm putting it in the wrong area).

Other Questions:
If I do not want to save it as a blob how do I save the file directory onto the server? (Assumption: text field that once open will show picture onto the canvas with the directory on the text field. Text field will be saved onto the database)
Is there a special way to read the blob or file directory from the valentina server?

This is a new learning curve for me with programming and writing language. I do understand some of the basic concepts and know how to use the sqlite code from XOJO, but once connected to the valentina server some sqlite codes doesn't work like the blob and needs a vsqlite code instead.
There are no comments made yet.
Ivan Smahin 承諾済みの回答
Hi Yeng Thao,

Please, take a look into V4RB examples, Examples/RBDB_way/VSqliteBLOB/VSqliteBLOB.rbp in particular.
This is about - how it is supposed to work with BLOBs locally and against vServer.

BTW, probably, there is a mistyping error - please check App.Open handler

if( gClient ) then

it should be

Connected = db.CreateDataBaseFileEx()

instead of

Connected = db.CreateDatabaseFile()
There are no comments made yet.
Ivan Smahin 承諾済みの回答
If I do not want to save it as a blob how do I save the file directory onto the server?

No, you can not put files/folders using vClient/vServer. The only option you have is to write data to the db.
There are no comments made yet.
Yeng Thao 承諾済みの回答
Didn't explain it properly on my part. What I meant is a file directory (ex: c:\Document\Pics\Fish.jpg) text onto the pic field instead of the blob. When the name is selected on a listbox the canvas will show the pic directory and pull the picture onto the canvas. I'll look at the example for v4rb to see if I can pull any coding. Thanks,
There are no comments made yet.
  • ページ :
  • 1

There are no replies made for this post yet.
However, you are not allowed to reply to this post.


Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories