🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TOLEContainer wont play stream

#1118
From: Viatcheslav V. Vassiliev
Date: Tue, 04 Jan 2005 18:48
54 lines
2875 bytes
Try

> Stream->SaveToStream(buffer);
  buffer->Seek(0, soFromBeginning);
> OleContainer1->LoadFromStream(buffer); //why cant play?

You may save BLOB into file and play file, I am not sure that OleContainer
will play sound.

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Kerby" <kerby_am@hotmail.com> �������/�������� � �������� ���������:
news:41d95aad@newsgroups.borland.com...
> 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: <41dae4fa@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!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
References: <41d95aad@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,f6bb891443acda8e
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <41d95aad@newsgroups.borland.com>
Subject: Re: TOLEContainer wont play stream
Date: Tue, 4 Jan 2005 21:48:25 +0300
Lines: 56
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 217.73.240.92
Message-ID: <41dae4fa@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1104864506 217.73.240.92 (4 Jan 2005 10:48:26 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!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