•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 426,136 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,743 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 5253 | Replies: 4
![]() |
•
•
Join Date: Jun 2007
Posts: 19
Reputation:
Rep Power: 2
Solved Threads: 0
Hello All,
i want to add a word/text file in database(MS-Access), for this i am using datatype ole object for that particular column.
i am using a text box to catch the file name and the complete path of the file and putting the value of textbox in that table column. But when i open the table to see the column value then it shows an empty value ie. nothing stored in that.
If i use Hyperlink datatype for that column then the path of the file is saved in the table but it could not get open by clicking at the link.
i will really appreciate if anyone can suggest me how to do this?
Thanks in advance.
Sayen.
i want to add a word/text file in database(MS-Access), for this i am using datatype ole object for that particular column.
i am using a text box to catch the file name and the complete path of the file and putting the value of textbox in that table column. But when i open the table to see the column value then it shows an empty value ie. nothing stored in that.
If i use Hyperlink datatype for that column then the path of the file is saved in the table but it could not get open by clicking at the link.
i will really appreciate if anyone can suggest me how to do this?
Thanks in advance.
Sayen.
•
•
Join Date: Mar 2007
Posts: 59
Reputation:
Rep Power: 2
Solved Threads: 5
MS KB 103257: ACC: Reading, Storing, & Writing Binary Large Objects (BLOBs)
MS KB 210486: ACC2000: Reading, Storing, and Writing Binary Large Objects (BLOBs)
Images (but you can also store copies of executable program files or other non-OLE data in a Microsoft Access table) can be loaded from files into an OLE Object/binary field (and extracted directly back to files) by using the ADO GetChunk and AppendChunk methods in VBA or other languages. In this way it is possible to display an image by extracting it to a temporary file and then using conventional file-based approaches, such as using the Access Image Control (though there are caveats with this control).
MS KB 210486: ACC2000: Reading, Storing, and Writing Binary Large Objects (BLOBs)
Images (but you can also store copies of executable program files or other non-OLE data in a Microsoft Access table) can be loaded from files into an OLE Object/binary field (and extracted directly back to files) by using the ADO GetChunk and AppendChunk methods in VBA or other languages. In this way it is possible to display an image by extracting it to a temporary file and then using conventional file-based approaches, such as using the Access Image Control (though there are caveats with this control).
•
•
Join Date: Jun 2007
Posts: 166
Reputation:
Rep Power: 2
Solved Threads: 7
First try to understand data import and export from a database. It uses many standard object linking programs that are stored in a library which you can acceess through your vb code.
Now your problem is to read a word/text file and put the contents in a table having a column to hold one line text. Is it correct.? As far as I know, I can't tell you how a word document is stored in a database as a worddocument itself. Of course imaging technique is far from your idea, and I hope., it will not work. You can import/export data between a word document and SQL database. What you are actually doing is after getting the file name input from the user, instead of searching that file and reading data (one line after another),you are writing to the table the file name.
just do these things.
1. after getting the filename with path from the user
2. open the file in inputmode
3. with in a loop, up to EOF
4. read the first line
5. insert that line read into your table in that particular column
6.loop back
Now your problem is to read a word/text file and put the contents in a table having a column to hold one line text. Is it correct.? As far as I know, I can't tell you how a word document is stored in a database as a worddocument itself. Of course imaging technique is far from your idea, and I hope., it will not work. You can import/export data between a word document and SQL database. What you are actually doing is after getting the file name input from the user, instead of searching that file and reading data (one line after another),you are writing to the table the file name.
just do these things.
1. after getting the filename with path from the user
2. open the file in inputmode
3. with in a loop, up to EOF
4. read the first line
5. insert that line read into your table in that particular column
6.loop back
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Reading from a text file and using it as a database (Visual Basic 4 / 5 / 6)
- Insert Contents Of Text File Into Database (ASP.NET)
- read text file (C)
- conversion of text file into data base file (Visual Basic 4 / 5 / 6)
- read text file (C#)
- connect to text file database (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Vb.net source code to access data from Access Database
- Next Thread: Printing a pdf file


Linear Mode