Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with accessing

Status
Not open for further replies.

Citra

Programmer
Jun 12, 2003
9
US


I'm using Oracle 9.2 SQL *Plus, and create a table from user "system" who is a DBA.

I tried to access the table from VB 6 using ADODC Connectivity(via Control). But I can't find my table from the table's list . But other user's tables are diplayed.

What was the actual problem? Is it possible to use Oralce 9 with VB 6.
 
By default each user may see only its own objects. Or it should be GRANTED to see others. In your case you may see this table if being connected as system. Otherwise your user should be granted to select from this table (or all ones). Though I'd recommend you to recreate this table in your own schema and never create new objects neither as SYSTEM nor as SYS in future.

Regards, Dima
 


Yeah! Now I'm creating tables from a separate user not from system.

Thank U

One more problem is how to store picture/multimedia files from VB
 
If you want to store picture/multimedia files from VB into Oracle you will need to use blobs (binary large objects).

It's not terrifically simple ;-)

Basically you define a table like

create table content
(content_id number(6) primary key,
content_desc varchar(250),
content_image blob);

Then you have to initialise the blob so..

insert into table content
values(123456, 'New Dodge Viper Convertible 8,277 cc 8.3 liters V 10 front engine with 102.4 mm bore, 100.6 mm stroke, 9.6 compression ratio, overhead valve and two valves per cylinder', empty_blob());

Now you have to do the VB Coding part - so you will have to open a database connection, and use the appendchunk and getchunk functions.

There is a code example on another forum here:


Good luck.
 
Thank U, I used the link given by U. But it uses long raw. Again BLOB produces error in select statement(After using the constructor empty_blob()).

Using Long Raw I'm alble to store the picture, but while retriving I'm unable to know the size of the picture so that I can create a binary array. The ADO's ActualSize method simply returns 4.

So, How can I know the size of the picture stored(i.e no . of bytes occupied by that picture)

thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top