Page 1 of 1
StartTransaction raise EODBCError
Posted: Mon 28 Sep 2009 17:22
by hendrang
Hi,
I am using Unidac to connect to Microsoft Access database.
why UniConnection1.StartTransaction always raise an error with message
"[Microsoft] [ODBC Microsoft Access Driver] Attribute cannot be set now'
Re: StartTransaction raise EODBCError
Posted: Tue 29 Sep 2009 05:50
by hendrang
hendrang wrote:Hi,
I am using Unidac to connect to Microsoft Access database.
why UniConnection1.StartTransaction always raise an error with message
"[Microsoft] [ODBC Microsoft Access Driver] Attribute cannot be set now'
I find out that if I set indexfieldnames value to any fieldname, the error message not raises anymore, is it the problem solver ?
Posted: Tue 29 Sep 2009 08:57
by Plash
You cannot start transaction when you have a dataset that is not fully fetched.
Set the FetchAll specific option to True to resolve the problem.
We'll change the default value of FetchAll to True in the next UniDAC build.
Posted: Tue 29 Sep 2009 12:14
by tobias_cd
Plash wrote:We'll change the default value of FetchAll to True in the next UniDAC build.
Plash,
please only change the default for the Access provider if necessary, not Oracle or SQL Server which would cause huge problems with existing code dependent on that behavior, thank you.
Regards,
Tobias
Posted: Tue 29 Sep 2009 13:36
by hendrang
tobias_cd wrote:Plash wrote:We'll change the default value of FetchAll to True in the next UniDAC build.
Plash,
please only change the default for the Access provider if necessary, not Oracle or SQL Server which would cause huge problems with existing code dependent on that behavior, thank you.
Regards,
Tobias
Hi Plash,
Thanks for reply.
It is strange that after I set fetchAll to true, I run the application, and then I set fetchAll to false, my application run smoothly. even now if I create new application without set fetchall to true, the error message does not raise anymore. Its really happen.
I don't like the idea to set fetchAll to true either because it will be performance problem.
Posted: Wed 30 Sep 2009 07:52
by Plash
Dataset can be fully fetched even if FetchAll = False. This can occur in the following cases:
- records count is less than a value of the FetchRows property;
- you manually scroll the dataset to the end;
- the IndexFieldsNames property is set.
Posted: Wed 30 Sep 2009 08:35
by hendrang
Plash wrote:Dataset can be fully fetched even if FetchAll = False. This can occur in the following cases:
- records count is less than a value of the FetchRows property;
- you manually scroll the dataset to the end;
- the IndexFieldsNames property is set.
Yes sir, The error raises again if I test with larger data. That mean I could not avoid set fetchall to true.

Thanks for your info.