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.
Getting "blob field" from an access query
Re: Getting "blob field" from an access query
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
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
Oleg Yershov
Re: Getting "blob field" from an access query
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.
Start Date: Month([inizio]) & "/" & Day([inizio]) & "/" & Year([inizio])
should be 10 characters long at maximum, yet is rendered as a BLOB object.