Modules & VBA :: Encrypt / Decrypt JPEG Image / Binary File
Oct 7, 2014
I am looking for a function that will allow me to encrypt/decrypt single image files as and when required. I have built my own simple one to encrypt a string that will be stored in a filename as all the ones I found created unusable filenames.
However I don't know where to start with the image file encryption.
(Any better way to encrypt a string that can be used in a file name that would be great too. My method is a bit basic).
View Replies
ADVERTISEMENT
Jul 16, 2014
I am in project to send members a birth day greeting with image.
Now I have designed report containing JPEG image. but i am not able to send report to mail as Mail body using MS outlook.
View 1 Replies
View Related
May 18, 2014
I would like to place an image file located at e.g. "C:MyImagesimage.png" into the clipboard. I have not been able to figure out how to do this. I have been able to place Text into the Clipboard using the DataObject late binding sub below.
Code:
Public Sub PutInClipBoard(strString As String)
Const DATAOBJECT_BINDING As String = "new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}"
With CreateObject(DATAOBJECT_BINDING)
.SetText strString
.PutInClipBoard
End With
End Sub
View 2 Replies
View Related
Apr 24, 2014
I need to migrate the contents of a table from Access Jet or Ace to SQL Server.
The table has 2 fields, an integer and a BMP image ex
Field1 Field2
1 BMPimage
2 BMPimage
3 BMPimage
4 BMPimage
If I manage to export the images to files like 1.bmp, 2.bmp, 3.bmp, 4.bmp etc I can then import them into SQL Server.
View 6 Replies
View Related
Aug 12, 2013
I have created a database for a church cemetery. It contains the usual names, birthrates deaths, etc.... I have also created a map of the cemetery in PDF format with the lot number highlighted which is assigned to a particular record. I did the same in excel with a layout of the lot and a JPEG picture of the grave marker. In my table I created Three columns - Site Plan, Lot Plan, and Grave marker. I insert the specific site plan, lot plan, and jpeg picture using the "insert object" in the table. On my form after a search, I have created three buttons.. Site Plan, Lot Plan & Grave Marker.
I have looked and experimented trying to assign these command buttons to open these files on the form. I don't have any experience with macros or VB code.
View 4 Replies
View Related
Oct 24, 2014
I'm working on a database which is designed to connect to an app called Canvas (www dot gocanvas dot com). It's for a client which runs a team of heating engineers. All the information regarding the engineer's job is uploaded to Canvas through their API as an XML file, and the engineers use an app on tablet to view the job details. When the engineer goes to their customer and does some work, the completed info (which parts were serviced etc) is then downloaded as an XML file via the API into the database. Also, the customer signs on the engineer's tablet to confirm that the work has been done.
Although the XML files for the job data upload and download fine, there's a different API for getting a download of the JPEG which contains the customer signature, and I'm having real problems finding out how to use this.
The API guide says this:
----
The Submissions API is restricted to authenticated users and requires a username and apassword to access. In addition, the ID field is required. If these fields aren't specified, an error is returned.
The result of this webservice invocation will be either a standard JPEG image or an error code.
Example: [URL] ....
All my code (which I've pasted at the foot of this message seems to work fine. There are no errors, and the ResponseBody object appears to contain a byte stream which would be the jpeg... if only I could get it into a jpeg file!
How I go about taking this "stuff" that's come back in the responsebody and actually create a jpeg image file from it? I feel that I'm so close that I can smell it, but can't get the last step!
Here's the existing code :
Code:
Sub DownloadImageFile()
Dim xhr As Object
Dim webServiceURL As String
Dim actionType As String
Dim PostData As String
Dim strResult As String
[Code] ....
View 7 Replies
View Related
Dec 4, 2014
I have a form that I would like to update a picture on using VBA. The source of the picture path is in part a query that is not bound to the form. So far I have the following code that is pretty much working, but with a couple flaws.
Code:
Private Sub Form_Current()
LoadDefaultPicture
End Sub
Sub LoadDefaultPicture()
Dim db As DAO.Database
[Code] ....
This is working. However, when I change the record the picture flashes the current picture once and then loads the new picture. It is like it reloads the current picture then loads the new one. I'm hoping there is a way to get rid of the flash.
Also, the code fails here:
strDefaultPictureName = rs.Fields("AttachmentName")
When the query does not return a record. I can definitely fix this by adding an if statement to check for a record, but I'm kind of perplexed at why it is failing at that line. I would expect it to assign an empty string to that variable name and then fail on the next command where I try and set the ".Picture" property of the image.
View 8 Replies
View Related
Oct 23, 2013
I am writing text to a database from a web form and need to encrypt the text in the Access database to ensure that the information is kept secure and only accessible from the web form that is password protected.
View 2 Replies
View Related
Mar 31, 2008
Hello, all.
I haven't worked with access in about 2 years, so I'm a bit rusty. I was wondering, what is the easiest way, if any, to output an image stored in an OLE object field to a file, like a bmp to be edited say in paint or something via VB code?
View 3 Replies
View Related
Aug 18, 2005
Hi,
I'm trying to add a control to my form that I don't know how to do.
On my form, I want the user to be able to click a button which will open up the standard file open dialog box. The user then will be able to browse through the appropriate directory and select an image file which will be saved on that specific record.
Attached is a strip down database as an example.
How can I do this? Any help would be greatly appreciated - I'm trying to do this for my work.
View 6 Replies
View Related
Apr 25, 2014
When using SendObject to send an e-mail, is there code to turn on the following?
- encrypt,
- digital signature and
- read receipt
Or must the user activate these when the e-mail is generated?
View 2 Replies
View Related
Aug 17, 2007
I am creating a employee db where the pic of the employee is displayed. The pic of the employee is currently stored in a folder using the employee ID as the file name, and the link to the pic file is stored in the employee table. The pic is displayed via an "on current" event of the employee form. I would like to be able to aquire a pic directly from a digital camera into the folder and have it available for the employee display form. I am not sure how to do it as the link to the pic file must be automatically stored in the employee table associating it with the employee info.
At present, I am thinking of capturing the pic from the digital camera into a Temptable in the db and converting the image in the Temptable into a jepg file in the pic folder with the employee id as its file name. If I can do this, I am pretty much home free. Can someone please help. If not the method above, please directly me to another. Thanks
View 5 Replies
View Related
Jul 12, 2015
I want to show an subform where in I would like to display images,txt,xlsx that are stored in a directory as icons which when clciked would open the respective files.The info related to the images are stored in t_CustomerFiles.
Record ID, CustomerID, DestinationPath,EventFileName,
1, A, C:UsersTestDesktopCustFiles, CustA1.jpg
2, A, C:UsersTestDesktopCustFiles, CustA2.xlsx
3, B, C:UsersTestDesktopCustFiles, CustB1.txt
4, C, C:UsersTestDesktopCustFiles, CustC1.jpg
5, C, C:UsersTestDesktopCustFiles, CustC2.jpg.
I would like to show them on a continusous sub form .. I am using image control by setting its control source property but it does not seem to work..Do I need something else for the xlsx and txt files..
View 2 Replies
View Related
Aug 31, 2006
Morning everyone,
I have a really persistant problem with my database whereby whenever I click on a hyperlink (in the database) to a Jpeg file it will display an error message, "unknown file format" then open the file as normal. The access windows then crash.
Has anyone else encountered this problem? If so doe anyone have a solution or a way round it!?
Any help much appreciated, have a good day :)
Matt
View 6 Replies
View Related
Jul 24, 2006
I am looking for some help, I have a access database that is interfacing to a sql storage.
The problem I am having, is I have a Image that is containing archives for emails, however I have been yet to figure out hor to read that text stored in the image.
So far I have been able to come up with the data being stored in binary, but am unable to read it in a access form.
Make sence? Hope so.
Through SQL, I am able to run a query to read the data:
SELECT CONVERT(varchar(8000),CAST (body AS binary(8000) )) from arc_bodies
However I would like this text to be read through a form in access, and am unable to figure out how... Please help if possible, would be greatly appreciated.
View 1 Replies
View Related
Nov 19, 2004
Hi everyone.
I have a problem displaying jpg files in a bounded image object.
After connecting Access 03 with ODBC to a SQL Server DB (SQLSDB) I wanted to display the image content of a table (jpg files) in Access. Instead of images Access returns the image filename.
After installing Microsoft Converter Pack and Photo Edit from an old Office XP Edition I was able to display jpg in unbounded image objects and simple image objects, but still the problem with the bounded image object witch contain the jpg files remains.
Any Suggestions ???
Thanks for your time
View 6 Replies
View Related
Jan 6, 2006
I am trying to store binary values (as decimal long integers) and then use bitwise comparisons to update the values. MS help suggest that the standard logical operators (And or etc) can do bitwise comparison as opposed to comparing boolean logical values for expressions; but I have found no way of making this work.
Is this possible? Any ideas. Doing it mechanically, by splitting the decimal into the relevant parts for any bit is very tedious!
Gibbo
View 3 Replies
View Related
Jun 1, 2005
I am working on a database with two main tables: One table that is linked in from another database, and another table contains addresses to the location of jpegs that correspond with the records in the linked table. (Every record does not have corresponding jpeg, only some of them do.) The way the forms are currently set up, there is a main form and a subform. The main form contains only a combo box where the user can choose a record. The subform shows the rest of the information pertaining to the record, including the jpeg. The problem is that all the other information changes when the user chooses a different record - except for the jpeg, it stays the same. The code to pull the jpeg into the form works when under the form load procedure, but the jpegs do not change when a different record is selected from the combo box on the form. I tried to do this a straight forward way, and then I tried using the RaiseEvent command, but nothing seems to work. I have a relationship b/t the 2 connecting fields, and I have tried all 3 join types. Any help would be greatly appreciated.
View 2 Replies
View Related
Dec 6, 2006
Hi
I have a problem in binary type in access
I have some values that are between 1 to 32 byte
I want to specify the type of my field to something like "varbinary" such as SQL server but I have not this type
actually I used OLE object type but it doesn't like it.
for example when I use:
insert into t_t1(i,j) values(1,23)
while j's type is OLE object,
the row is inserted but I can not see the value of j column and I can not select on j column too for example
select * from t_t1 where j=23
has no result.
furthermore, I want to use hex values but I can not do it.
when I use
insert into t_t1(i,j) values(1,0xAD)
I got an error that says the type is mismatched
I know it may shows I expect unreasonably from access but please help me to find the solution
thanks for your attention
Best regard
View 1 Replies
View Related
Sep 23, 2006
I have a path to a JPEG file in a variable. I want to click on a command button and open the JPEG file. Is there code which in effect double clicks on the path to open the file? Thank you.
View 1 Replies
View Related
Jan 29, 2007
Hi there,
I have a simple bit of VBcode in my database which reads the password a user enters and 'encrypts' it for storing in the user table. It's more obfuscation than encryption to be honest, and I feel limited by the 'text' data type assigned to the password field.
At the moment it works by taking the password entered, and converting the whole lot into a byte array, then for each 'character' in the array, changing its binary value. At the moment it's then converted back into a string and dumped into the 'password' field, as garbage characters. But they are still characters, and if I go out of range of the character set it results in horrible errors :D.
I feel I may be missing the blindingly obvious and could just not convert it back to string, and write the binary into a text field instead, but I'm not sure how I'd get intelligible data back.
The reason it's not exactly encryption is because the key is the same for all characters on all passwords (I just multiply the binary value by 2!) what I want is to have a key as well, stored in another field alongside, but again can't implement this due to character-set range issues.
So my question is - is there a 'raw' data field hidden somewhere amongst the features of microsoft access, or should I be thinking about just storing the numbers themselves? For the moment I'll investigate the latter, but I'll appreciate any help! Thanks :)
View 1 Replies
View Related
Sep 24, 2013
I have a text column with hexadecimal strings like "4E1B0A65FE3299FE", ie. of length 16.I'm doing an ALTER COLUMN query to convert the column to varbinary, but Access is doing conversion by ASCII, which results in a varbinary field of size 32, I think this is because the text column is in Unicode.
SQL Server has something called "styles" which are used with CONVERT.where you can choose to convert by two characters at a time 2:1..How do I do the same in an Access query? CONVERT/CAST are no supported.
View 1 Replies
View Related
Apr 11, 2014
im after trying to make an image on a splash screen rotate around on its centre as a loading icon?
Im guessing i will need a loop on the form opening?
View 1 Replies
View Related
Dec 27, 2013
I want to use an On Click event on an image field on a subform to fire up either Windows Photo Viewer or Corel PaintShop Pro with that image active - but don't really know where to start. DoCmd, Shell ?
View 5 Replies
View Related
Jun 20, 2014
How I would link to jpeg files and have access render them. How to do it.
View 2 Replies
View Related
May 10, 2014
i want to copy binary data to another table with same structure.
how can i do this.
View 4 Replies
View Related