Welcome to our forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Forum Statistics

  • Forum Members:
  • Total Threads:
  • Total Posts: 6
There are 1 users currently browsing forums.
C and C++ Programming C and C++ are both robust and hugely popular programming languages that are used in multiple facets of programming, ranging from games to operating systems to simple text editors. To dicuss and seek advice, ask around here.

Reply
  #1  
Old 4 Weeks Ago
Toddler
 
Join Date: Feb 2010
Posts: 5
Rep Power: 0
Lesanjo is on a distinguished road
Accessing and manipulating BLOB fields

Hi my name is Steve Lesanjo,

I'm a C++ programmer using Borland's C++ Builder 5. I'm working on a database application
and its causing me serious grief right now...

I'm using a Paradox 7.0 table with the C++ Builder and I simply can't find a way to insert data into BLOBs.
I also can't save or view pictures using the TDBImage VCL component either.My latest foiled attempt was trying to
save an image to a BLOB field using what seems to be an iron-clad piece of code.

//-----------------------------------------
Table1->Edit();
Open->Execute();
String file=Open->FileName;
ShowMessage(file);

TBlobField *blob; blob=new (TBlobField);

blob->FieldName="Image";
blob->LoadFromFile(file);

Table1->Post();
//-----------------------------------------

On compiling this code failed, siting that the BlobField doesn't have the dynamic object allocation function or something.

I'm also unable to add an OCX contoller for an OLE2 component nor save it in its own BLOB field.

Please, anyone, come to my aid

Reply With Quote
  #2  
Old 4 Weeks Ago
vento's Avatar
Sexy monkey
 
Join Date: May 2009
Location: Lithuania
Age: 16
Posts: 185
Rep Power: 1
vento is on a distinguished road
Re: Accessing and manipulating BLOB fields

first, I would change this line to
Code:
TBlobField *blob = new TBlobField;
Next I would check if it really has a constructor without arguments.
Reply With Quote
  #3  
Old 4 Weeks Ago
Toddler
 
Join Date: Feb 2010
Posts: 5
Rep Power: 0
Lesanjo is on a distinguished road
Re: Accessing and manipulating BLOB fields

I've tried

TBlobField *blob=new TBlobField,

it just wont take...as for the parameters, lemme try that right now...

Thanx
Reply With Quote
  #4  
Old 4 Weeks Ago
Toddler
 
Join Date: Feb 2010
Posts: 5
Rep Power: 0
Lesanjo is on a distinguished road
Re: Accessing and manipulating BLOB fields

Its now compiling just fine but at runtime, use of this code raises a vcl access violation...

Reply With Quote
  #5  
Old 4 Weeks Ago
vento's Avatar
Sexy monkey
 
Join Date: May 2009
Location: Lithuania
Age: 16
Posts: 185
Rep Power: 1
vento is on a distinguished road
Re: Accessing and manipulating BLOB fields

use a debugger.
Reply With Quote
  #6  
Old 4 Weeks Ago
Toddler
 
Join Date: Feb 2010
Posts: 5
Rep Power: 0
Lesanjo is on a distinguished road
Re: Accessing and manipulating BLOB fields

I'm using Borland's Development software....it has an inbuilt debugger....
Reply With Quote


Reply

Tags
blobs, c++ builder, paradox


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On