 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Randel Bjorkquist Guest
|
Posted: Fri Oct 24, 2003 6:45 pm Post subject: Need help storing a Microsoft Word or Excel Document in a SQ |
|
|
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
|
Posted: Fri Oct 24, 2003 7:22 pm Post subject: Re: Need help storing a Microsoft Word or Excel Document in |
|
|
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
|
Posted: Sat Oct 25, 2003 5:12 pm Post subject: Re: Need help storing a Microsoft Word or Excel Document in |
|
|
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
|
Posted: Mon Oct 27, 2003 2:06 pm Post subject: Re: Need help storing a Microsoft Word or Excel Document in |
|
|
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 |
|
 |
|
|
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
|
|