April 3, 2002 at 10:18 am
I'm trying to save a crystal report (.rpt) file into my sql database but im not having much luck. I have the following code
Set mstream = New ADODB.Stream
mstream.Type = adTypeBinary
mstream.Open
rs.Open "Select Filecontents from Test", RetrieveDBConnection
fname = lblFile.Caption
mstream.LoadFromFile fname
rs.Fields("Filecontents").Value = mstream.Read
rs.Update
i get the following error "Object or provider can't perform requested operation"
What type does my field have to be in order for this to work. Is it even possible to save a .rpt to a database? Help is appreciated! Thanks
April 3, 2002 at 11:02 am
It's possible, no reason for it not to work. Use text or image for the column type, depending on whether it really is plain text through out or not.
Andy
April 3, 2002 at 11:05 am
i'll give that a shot...thank you!
April 3, 2002 at 11:15 am
i changed it to both image and text and i still get the error "Object or provider is not capable of performing requested operation" My table consists of only one field called Filecontents that i want to use to store this file. I have ADO 2.5 referenced and i'm using a connection string to connect to the database. I also get the error when i tried to save a simple bmp file. Anyone help?
April 3, 2002 at 11:41 am
Are there any other ways this can be done? Thanks for the help
April 4, 2002 at 8:05 am
figured it out!
April 4, 2002 at 8:58 am
What ended up being your solution?
Andy
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply