Question attach zip/rar in a new tab on form?

JMA

Member
Joined
Dec 13, 2013
Messages
5
Programming Experience
Beginner
G.E

how can i set up a attached file in a new tab on form visual basic 2008
attachment should be type (rar or zip)

any one can help me ?
 
Many records where? Do you mean in a database? If so then maybe you should say that. What exactly do you mean by "attach"? You're going to have to provide a proper explanation because, if we have to guess, it will be a big waste of everyone's time if we guess wrong. Your second post sounds rather different to your first so what are we supposed to think?
 
Many records where? Do you mean in a database? If so then maybe you should say that. What exactly do you mean by "attach"? You're going to have to provide a proper explanation because, if we have to guess, it will be a big waste of everyone's time if we guess wrong. Your second post sounds rather different to your first so what are we supposed to think?

true - all records put in database

I mean from "attach" : upload specific type of file ( .rar or .zip ) to database and when I need this file I can download it .

such as the photo >>


Image.jpg



Sorry For My Bad English ..
 
So, what type of database and what do the "tabs" you mentioned in the first post have to do with it?


- what type of database?
Microsoft Access Database File (OLE DB)

- what do the "tabs" you mentioned in the first post have to do with it?
I don't want all files show together. each record have ID number, and " tab " only to filter files by ID
 
Are you actually talking about a column in the database with data type Attachment? For future reference, please provide a FULL and CLEAR description up front so that we don't have to waste all this time toing and froing to work out what's actually going on.
 
okey I'm sorry for that ..
i don't have any idea about upload & download , so i use Microsoft Access database File (OLE DB) . If this database is not appropriate I'm going to change it.

just i want project same this photo to i understand how created


Image.jpg


other details I can complete them (=
 
Any particular reason that you chose not to answer my question? I asked it for a reason.

If the column is type Attachment then there's no easy option. It is possible to retrieve existing attachments with a bit of jiggery-pokery:

Retrieving & Viewing Attachments from Access 2007 or Later ACCDB Files

It's not possible to save new attachments using ADO.NET though. I have seen some examples using DAO so it's possible but a bit ugly.

If your column is type OLE Object then you can save and retrieve arbitrary binary data. You'll have to save the data using ADO.NET in the first place or else some data may not be recognised properly. In that case, you simply use ADO.NET to save and retrieve a Byte array the same way as you would any other data. Exactly how you convert between the original data and the Byte array may depend on the type of data but you can always use File.ReadAllBytes and .WriteAllBytes if working directly with files.
 
Back
Top