Solved

Databases, Blob - How do I access?

Posted on 1998-08-27
7
315 Views
Last Modified: 2010-04-10
How can I access my Blob Field I created.  I want to store/retrieve 1024 Bytes.  But I just seem to be too clumsy too store or retrieve anything from it (newbie-experience).

I'm working with C++B 3 on a Paradox 7 Table.

Thx
0
Comment
Question by:Odie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 2

Expert Comment

by:duneram
ID: 1171438
I use the Borland Database Engine.  Get your hands on a copy of it.  It comes with the api and documentation for you to build classes for tables so you can get and put to a blob in a painless manner.  try www.inprise.com

Go to http://www.inprise.com/searchsite/
and enter 'Frameworks'  and check the Borland Database Engine checkbox

Then press search.
0
 
LVL 2

Expert Comment

by:duneram
ID: 1171439
Another decent reference at that site:

http://www.inprise.com/devsupport/bde/cppfiles.html
0
 
LVL 1

Author Comment

by:Odie
ID: 1171440
Um...  I should have mentioned that I'm using the BDE too.  But I'm too stupid too handle the TBlobField.

MyTable->FieldByName("MyBlobField")->...

then what do I do with this?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:duneram
ID: 1171441
I'll look into it!!  Do you use the frameworks code generator?
0
 
LVL 1

Author Comment

by:Odie
ID: 1171442
I don't know what it is.  (Guess I don't then.)
0
 
LVL 2

Expert Comment

by:duneram
ID: 1171443
I'll take a look this weekend...  oh i forgot I am going to be out of town this weekend. I guess I have to wait until monday.  HOpefully someone else will beat me and post your answer here.

In the mean time take a look at any of these functions in your documentation:

DbiAppendRecord: Appends a record to the end of the table associated with the given cursor.
DbiDeleteRecord: Deletes the current record of the given cursor.
DbiFreeBlob: Closes the BLOB handle located within the specified record buffer.
DbiGetBlob: Retrieves data from the specified BLOB field.
DbiGetBlobHeading: Retrieves information about a BLOB field from the BLOB heading in the record buffer.
DbiGetBlobSize: Retrieves the size of the specified BLOB field in bytes.
DbiGetField: Retrieves the data contents of the requested field from the record buffer.
DbiGetFieldDescs: Retrieves a list of descriptors for all the fields in the table associated with the cursor.
DbiGetFieldTypeDesc: Retrieves a description of the specified field type.
DbiInitRecord: Initializes the record buffer to a blank record according to the data types of the fields.
DbiInsertRecord: Inserts a new record into the table associated with the given cursor.
DbiModifyRecord: Modifies the current record of table associated with the cursor with the data supplied.
DbiOpenBlob: Prepares the cursor's record buffer to access a BLOB field.
DbiPutBlob: Writes data into an open BLOB field.
DbiPutField: Writes the field value to the correct location in the supplied record buffer.
DbiReadBlock: Reads a specified number of records (starting from the next position of the  cursor) into a buffer.
DbiSaveChanges: Forces all updated records associated with the cursor to disk.
DbiSetFieldMap: Sets a field map of the table associated with the given cursor.
DbiTruncateBlob: Shortens the size of the contents of a BLOB field, or deletes the contents of a BLOB field from the record, by shortening it to zero.
DbiUndeleteRecord: Undeletes a dBASE record that has been marked for deletion (a "soft"  delete).
DbiVerifyField: Verifies that the data specified is a valid data type for the field specified, and that all validity checks in place for the field are satisfied. It can also be used to check if a field is  blank.
DbiWriteBlock: Writes a block of records to the table associated with the cursor.


0
 
LVL 1

Accepted Solution

by:
cph earned 50 total points
ID: 1171444
You can only read/write and do some basic file operation on a BLOB as the DB doesn't know anything about its content. What you could do is set a field in your table run an SQL query based on that field then retrieve it.

Hope this help,

CpH
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

742 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question