BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need help storing a Microsoft Word or Excel Document in a SQ

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Randel Bjorkquist
Guest





PostPosted: Fri Oct 24, 2003 6:45 pm    Post subject: Need help storing a Microsoft Word or Excel Document in a SQ Reply with quote



Hi all,

I am looking for some help to get both, a Microsoft Word and Excel documents
into an SQL Server database without using data aware controls. I have been
able to get an image into the database, via copying and pasting an image
into a TDBImage control while having a life dataset.

I am not looking for some help to get these other documents and images into
the database without using data aware controls. I'm honestly not sure what
the SQL statement would look like either. How do I assign a binary value or
build my SQL statement on the fly and use a binary value.

INSERT INTO TestTable (Pic, PicDesc, WDoc, WDocDesc, EDoc, EDocDesc)
VALUES(??????, "BlueMoon.jpg", ??????, "Doc1.doc", ??????, "Excel1.xls")

I have an Image field set up in a Microsoft SQL 2000 Server database. I'm
building my application using CBuilder 6.0 Enterprise.

Thanks for any and all help in advance,

Randel Bjorkquist


Back to top
Randel Bjorkquist
Guest





PostPosted: Fri Oct 24, 2003 7:22 pm    Post subject: Re: Need help storing a Microsoft Word or Excel Document in Reply with quote



Hey Viatcheslav,

Thanks for the info, but I've never used either the TParam or TParamter
object. Can you give me a quick SQL example?

Thanks,

Randel Bjorkquist

"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote

Quote:
Use query with parameters and LoadFromStream()/SaveToStream() method of
TParam or TParameter object.

//----------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)


"Randel Bjorkquist" <rbjorkquist (AT) coilcraft (DOT) com> сообщил/сообщила в
новостях
следующее: news:3f997348 (AT) newsgroups (DOT) borland.com...
Hi all,

I am looking for some help to get both, a Microsoft Word and Excel
documents
into an SQL Server database without using data aware controls. I have
been
able to get an image into the database, via copying and pasting an image
into a TDBImage control while having a life dataset.

I am not looking for some help to get these other documents and images
into
the database without using data aware controls. I'm honestly not sure
what
the SQL statement would look like either. How do I assign a binary
value
or
build my SQL statement on the fly and use a binary value.

INSERT INTO TestTable (Pic, PicDesc, WDoc, WDocDesc, EDoc, EDocDesc)
VALUES(??????, "BlueMoon.jpg", ??????, "Doc1.doc", ??????, "Excel1.xls")

I have an Image field set up in a Microsoft SQL 2000 Server database.
I'm
building my application using CBuilder 6.0 Enterprise.

Thanks for any and all help in advance,

Randel Bjorkquist







Back to top
Viatcheslav V. Vassiliev
Guest





PostPosted: Sat Oct 25, 2003 5:12 pm    Post subject: Re: Need help storing a Microsoft Word or Excel Document in Reply with quote



ADOCommand1->CommandText = "Insert into MyTable (BlobColumn) Values
(:Blob)";
ADOCommand1->Parameters->Refresh();
ADOCommand1->Parameters->ParamByName("Blob")->LoadFromStream(MyStream);
ADOCommand1->Execute();

//----------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)



"Randel Bjorkquist" <rbjorkquist (AT) coilcraft (DOT) com> сообщил/сообщила в новостях
следующее: news:3f997c0f$1 (AT) newsgroups (DOT) borland.com...
Quote:
Hey Viatcheslav,

Thanks for the info, but I've never used either the TParam or TParamter
object. Can you give me a quick SQL example?

Thanks,

Randel Bjorkquist

"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote in message
news:3f997438$2 (AT) newsgroups (DOT) borland.com...
Use query with parameters and LoadFromStream()/SaveToStream() method of
TParam or TParameter object.

//----------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)


"Randel Bjorkquist" <rbjorkquist (AT) coilcraft (DOT) com> сообщил/сообщила в
новостях
следующее: news:3f997348 (AT) newsgroups (DOT) borland.com...
Hi all,

I am looking for some help to get both, a Microsoft Word and Excel
documents
into an SQL Server database without using data aware controls. I have
been
able to get an image into the database, via copying and pasting an
image
into a TDBImage control while having a life dataset.

I am not looking for some help to get these other documents and images
into
the database without using data aware controls. I'm honestly not sure
what
the SQL statement would look like either. How do I assign a binary
value
or
build my SQL statement on the fly and use a binary value.

INSERT INTO TestTable (Pic, PicDesc, WDoc, WDocDesc, EDoc, EDocDesc)
VALUES(??????, "BlueMoon.jpg", ??????, "Doc1.doc", ??????,
"Excel1.xls")

I have an Image field set up in a Microsoft SQL 2000 Server database.
I'm
building my application using CBuilder 6.0 Enterprise.

Thanks for any and all help in advance,

Randel Bjorkquist









Back to top
Randel Bjorkquist
Guest





PostPosted: Mon Oct 27, 2003 2:06 pm    Post subject: Re: Need help storing a Microsoft Word or Excel Document in Reply with quote

Viatcheslav,

I was to get this to work.

Thank you very much,

Randel Bjorkquist




"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote

Quote:
ADOCommand1->CommandText = "Insert into MyTable (BlobColumn) Values
(:Blob)";
ADOCommand1->Parameters->Refresh();
ADOCommand1->Parameters->ParamByName("Blob")->LoadFromStream(MyStream);
ADOCommand1->Execute();

//----------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)



"Randel Bjorkquist" <rbjorkquist (AT) coilcraft (DOT) com> сообщил/сообщила в
новостях
следующее: news:3f997c0f$1 (AT) newsgroups (DOT) borland.com...
Hey Viatcheslav,

Thanks for the info, but I've never used either the TParam or TParamter
object. Can you give me a quick SQL example?

Thanks,

Randel Bjorkquist

"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote in message
news:3f997438$2 (AT) newsgroups (DOT) borland.com...
Use query with parameters and LoadFromStream()/SaveToStream() method
of
TParam or TParameter object.

//----------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)


"Randel Bjorkquist" <rbjorkquist (AT) coilcraft (DOT) com> сообщил/сообщила в
новостях
следующее: news:3f997348 (AT) newsgroups (DOT) borland.com...
Hi all,

I am looking for some help to get both, a Microsoft Word and Excel
documents
into an SQL Server database without using data aware controls. I
have
been
able to get an image into the database, via copying and pasting an
image
into a TDBImage control while having a life dataset.

I am not looking for some help to get these other documents and
images
into
the database without using data aware controls. I'm honestly not
sure
what
the SQL statement would look like either. How do I assign a binary
value
or
build my SQL statement on the fly and use a binary value.

INSERT INTO TestTable (Pic, PicDesc, WDoc, WDocDesc, EDoc, EDocDesc)
VALUES(??????, "BlueMoon.jpg", ??????, "Doc1.doc", ??????,
"Excel1.xls")

I have an Image field set up in a Microsoft SQL 2000 Server
database.
I'm
building my application using CBuilder 6.0 Enterprise.

Thanks for any and all help in advance,

Randel Bjorkquist











Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.