Page 1 of 1

Getting "blob field" from an access query

Posted: Tue Dec 12, 2017 10:46 pm
by cadetblue
I am connecting by means of this string: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Dropbox\Gestione\dummy.accdb;Persist Security Info=False
The SQL command is a select * from an already existing access query.
Then I use a dataset loop, assigning the field names and values to variables.
When writing to a text file those variables, some fields are ok, but there is plenty of "Blob fields".
For example, this is rendered as Blob field: Start Date: Month([inizio]) & "/" & Day([inizio]) & "/" & Year([inizio])
This too: Description: "Descrizione lunga"

Someone has a guess about what is wrong with my task?

Many thanks.

Re: Getting "blob field" from an access query

Posted: Wed Dec 13, 2017 9:28 am
by Oleg
Database driver looks at the table structure.
It doesn't depend on field contents.
For example DB driver can interprets VARCHAR(2000) as BLOB (or CLOB) field.

You can shrink the length of this field bu using ACCESS internal function LEFT

For example
select Field1, Field2, Left(Field3, 50) as f3 from my table

Re: Getting "blob field" from an access query

Posted: Thu Dec 14, 2017 4:17 pm
by cadetblue
Thanks for answering, Oleg. But:

Start Date: Month([inizio]) & "/" & Day([inizio]) & "/" & Year([inizio])

should be 10 characters long at maximum, yet is rendered as a BLOB object.