🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1113

TOLEContainer wont play stream

#1113
From: Kerby
Date: Mon, 03 Jan 2005 14:45
29 lines
2202 bytes
I want to play a wav sound from my MS Access database, the current data in
the field named "Wav".
I use a DBGrid connected to a DataSource that is connected to ADOTable1.
I put TOLEContainer1 object in my form hoping to connect it to my Datasource
but it just cant be
connected to it (that means i cant play WAV of a current selected entry).
My problem here is OLEContainer1 cant connect to a datasource and i don't
have any idea how.
So i decided to seach the net and find some code to play WAV from a database
here's the code:
// -------------------------------------------------------------------------
-------------
TMemoryStream *buffer = new TMemoryStream();

TADOBlobStream* Stream = (TADOBlobStream*)
ADOTable1->CreateBlobStream(ADOTable1->FieldByName("Wav"),bmRead);

Stream->SaveToStream(buffer);

OleContainer1->LoadFromStream(buffer); //why cant play?

// -------------------------------------------------------------------------
-------------

i dont know how to work this out; how can i manage to play a wav file from
ADOTable1 "Wav" Field
using OleContainer1 or should i use other components...

pls. help.
Technical Details
Message-ID: <41d95aad@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeder.wxs.nl!newsfeed.multikabel.nl!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,f6bb891443acda8e,start
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Kerby" <kerby_am@hotmail.com>
From: "Kerby" <kerby_am@hotmail.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: TOLEContainer wont play stream
Date: Mon, 3 Jan 2005 22:45:51 +0800
Lines: 31
Organization: Driftmark
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 203.177.178.246
Message-ID: <41d95aad@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1104763565 203.177.178.246 (3 Jan 2005 06:46:05 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeder.wxs.nl!newsfeed.multikabel.nl!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail