I have an ms access database file (.mdb) with two columns:
Id with Data Type 'Short Text'
Image with Data type 'Long Text'
The db has about 1000 entries and it's file size is about 50 Mb, so I know the images are there.
But whenever I try to export the data (and in MS Access itself) all I see is "II*" for the image field.
I know nothing about mdb files, how in the world do I extract that data? Ideally I want base64 encoding, but I'll settle for anything at this point.
Update 7-5-2022
I write a C# program to read the data and it is in some form of encoding I don't recognize. The originator of the data says they "opened the tiff image in Binary mode and stored it in the string in MS Access". So I guess the question is how does MS Access encode binary data being saved directly into a Long Text field.
Here's a snippet of the text stored:
Update 7-6-2022
They used the VB FileSystemObject to "open in binary mode" and save to the text field. So I guess however that object decided to encode the binary data as a string, is how it is being stored. #sigh
Trying to see if I can reverse the process
Related
My SSIS code read file encoded as windows-1250 and put it do database. But I want to display it later in web application (UTF-8). How to transform it quickly?
I think that best option is SSIS conversion, but HOW?:)
When inserting data into the database, use 'DT_WSTR' as data type instead of 'DT_STR' in the SSIS package where 'W' in 'DT_WSTR' stands for Unicode.
Use 'nvarchar' as data type instead of 'varchar' in the database. It'll store your data in Unicode Format.
I have created a csv file, with no header.
its 1496 rows of data, on 2 columns in the form:
Real; String
example:
0.24; "Some very long string"
I go to New - Dataset - From local file
Pick my file, and No header csv format
But after its done loading i get an error message i cant decrypt:
Dataset upload failed. Internal Service Error. Request ID:
ca378649-009b-4ee6-b2c2-87d93d4549d7 2015-06-29 18:33:14Z
Any idea what is going wrong?
At this time Azure Machine Learning only accepts the comma , seperated, American style CSV.
You will need to convert to a comma separated CSV
I'm creating SSIS package for to get .csv file to my local server and transfer it to FTP
When I get my csv into FTP and open into excel, My data getting shift over to other columns. Is there internally any kind set up do I need to change?
Also I tried different text qualifier still did not work.
It sounds like there may be hidden characters in your data set. If you are using comma's you may want to consider using a lesser used character for the delimiter such as a pipe "|". For instance an address may naturally have comma's. If a pipe shows up in an address field it's probably a type-o, and is far less likely. Things that shift data cells are often things like tab characters and CRLF. You can also open your data set in a text editor like notepad ++ and choose the "Show all Characters" option under "View->Show Symbols" menu option to see what the exact character is. If it's rampant in your data set you can use the replace function within the Derived Column Task to scrub the data as it comes out of the data source.
I am saving a string to ms access data base, memo is the data type for the field. My string will have more than 65,535 characters but memo can save only 65,535 characters. Is there any data types/way to save more than 65,535 characters in ms access database ?
You could save the string in a txt file and a link to the file location in de Database. Of course you can not query the text from the database but the txt file itself can be queried by code in VBA.
Second option is to save the file as an OLE-object in database. Althow it isn't much different from above. You still can't query it.
Hope it helps.
I have an access97 database and I am trying to write some code to export to a CSV file - (I am new to VBA).
I have this working however, there is one field that I am exporting that is a currency so in it for example is £3,456.00 - when I export to the CSV I get exactly this - however I need it to just be the number i.e 3456.00.
On a similar issue - I have the date as dd/mm/yyyy and I wonder if there is a way to convert that in VBA to yyyy-mm-dd?
Please bear in mind any solutions has to be simple due to my limited knowledge!
Sorry about the delay; seemingly easy things took longer. As I assumue from your:
DoCmd.TransferText acExportDelim, "olly_csv", "olly aorder export", "\\10.0.0.38\nw_upload\aorders.csv"
that you have an export specification "olly_csv" that determines how to export the
resultset of the SELECT query "olly aorder export" to the file "aorders.csv"
in the destination folder "\10.0.0.38\nw_upload".
The easy way to export the CURRENCY field(s) as plain Double/Float/Single number
and the DATE field(s) with a format of your choice (dd/mm/yyyy) would be to
request just that in the export specification. I found no way to do that in Access
2000 (As far as I can see, there are limited ways to pick date formats, but the features of the Import Wizard to deal with the types of columns are not implemented by the
Export Wizard).
The Docs about "TransferText" (sorry, Access 2003) state:
SpecificationName Optional Variant. A string expression that's the name of
an import or export specification you've created and saved in the current
database. For a fixed-width text file, you must either specify an argument or
use a schema.ini file, which must be stored in the same folder as the
imported, linked, or exported text file. To create a schema file, you can use
the text import/export wizard to create the file. For delimited text files
and Microsoft Word mail merge data files, you can leave this argument blank
to select the default import/export specifications.
Now there are to schools of Microsoft Docs philology: The optimists will read
that as: If you don't pass an export specification and have a suitable schema.ini
file, then the export process will adhere to the specs in the file. The pessimists
will say: Microsoft never agreed to fullfill your pipe dreams - if you don't
specify an argument for a non-fixed-width file, the TransferText command will
use some obscure default export specification (please pay a consultant to
seek and change it).
Let's be optimistic!
So create a schema.ini file with a section for "aorders.csv". For my tests I
used a table
Tabelle: OlliesOrders
Name Typ Größe
OrderId Long Integer 4
Amount Währung 8
DateDue Datum/Uhrzeit 8
(sorry about the German; Amount is Currency, DateDue Date/Time). For that table
the schema.ini section looks like:
[aorders.csv]
ColNameHeader=True
CharacterSet=1252
Format=Delimited(;)
DateTimeFormat=dd/mm/yyyy
Col1=OrderId Integer
Col2=Amount Float
Col3=DateDue Date
You'll have to adapt this example to your fields. Do you want column headers? Is the
windows codepage ok? What about field separators? I had to use ; (German locale), you
may need "Format=CSVDelimited". Look here for some background. Then call
DoCmd.TransferText acExportDelim, , "olly aorder export", "\\10.0.0.38\nw_upload\aorders.csv"
and check if optimists rule.
For pessimists:
Create a new query on the table to export (from). Change the type to Ausführung/Execute (?)
and edit the SQL until it looks like:
SELECT OlliesOrders.* INTO [aorders.csv] IN 'M:\trials\23forum\SOTrials\txt' [TEXT;] FROM OlliesOrders;
resp.:
SELECT YourFieldsList INTO [aorders.csv] IN '\\10.0.0.38\nw_upload' [TEXT;] FROM YourTable;
and execute it (from the query window or a macro/module Sub). My result:
"OrderId";"Amount";"DateDue"
1;1411,09;29/04/2011
2;123,45;13/04/2011
ADDED: Evidence for my claim, that you can't specify types in the Export Wizard:
Export
Import