Home > Back-end >  The DataSnap client use the select the problem of flow field
The DataSnap client use the select the problem of flow field

Time:10-02

If a flow (image) field in a database table, I use 'select * from table' statement query, return TDBXReader type,

I preferable to other types of field values on the client, but I can't flow field (I know this field must have preserved the value), it is nil, and why?

Such as:
Table test
Fields:
Id, name, age, PIC four fields,

Take a record on the client code (I test, so the SQL statement to return a record only) :

Reader:=server. Fun_open_sql_dbx (str_sql);
If the reader=nil then exit;
Reader. Next;
Stream:=TMemoryStream. Create;
Stream:=TMemoryStream (reader. Value [3]. AsStream);
Stream. Position:=0;
Img2. Picture. Bitmap. LoadFromStream (stream);
Stream. Free;

The fourth field test table is image field, but the reader. The Value [3] have a pointer Value, but when asstream becomes nil, why? Don't you come back?

In addition, by the way, I use ADO way test, can return the value of flow character and converted into images,
But with the server/client mode, using the DBX way, on the client side is wrong,

I have just tried it on, there is a problem, I use the reader. The Value [3]. The IsNull test, and found that it is true, but the other fields is False, why?
Really didn't have sent the information?

If so, what should I do?

I don't want to separate flow field, want to go out with other types of field, use the select aa, bb, cc from tt this way, the line is not?

Thank you all!

CodePudding user response:

DateSnap three-tier client to the server, not directly upload, need to convert character, estimate your field is no value,

CodePudding user response:

ADO, other unused
  • Related