Reports crash in Acc 2010 Runtime (1 Viewer)

Tiger955

Registered User.
Local time
Today, 17:34
Joined
Sep 13, 2013
Messages
140
I have a Problem which I cannot solve at all.

On a customers PC (Win 7 32bit) runs an app in an acc 2010 RT (SP2 already), backend is a SQL Server 2008 Express.

I have a couple of reports which do not work properly.

Before that I have to state that I did everything I know to check my database before deploying it to the RT Environment.

- decompile, compact, checking references, all that stuff...

An accde (ord accdr) did not even start on the customers machine. It Fails with the error
"The database cannot be opened because the VBA project contained in it cannot be read. The database can be opened only if the VBA project is first deleted. Deleting the VBA project removes all code from modules, forms and reports. You should back up your database before attempting to open the database and delete the VBA project."

No further error code. Web Research did not help me in any way.

Well, then I tried it with an accdb on the acc RT, it starts, seems to work but the it crashes on reports who have an passthrough query as recordsource.

But not all, only some. The recordsource itself delivers the correct data - I open the PTquery via a button just to chekc if there is any content , but the reports bring no data. Very strange, as others works the same way, but using other PT queries, but have the same construction, that the datasource it the PTquery. No filter, nothing.

I am totaly in despair as there is no pattern of this error. Not only that the Report has no Content (could avoid this by no_data...), I cannot find the reason of that.

it is very very strange and also a check of all the references showed the correct Versions on both machines.

Any ideas is very much appreciated.

Michael
 

spikepl

Eledittingent Beliped
Local time
Today, 17:34
Joined
Nov 3, 2010
Messages
6,142
FYI: Do not invent your own utterly confusing abbreviations. It waste's everybody's time.

For other readers: RT apparently means Runtime and not the RT-version of windows. PT is whatever it is.

As to your issues: when things crash quote the error message - we do not read minds.

Runtime is difficult to debug, because it goes belly-up on unhandled errors. You could insert error handlers everywhere to get a clue. Download the free mz-tools - it makes it easy to insert error handling.
 
Last edited:

Tiger955

Registered User.
Local time
Today, 17:34
Joined
Sep 13, 2013
Messages
140
Spikepl don't be that angry.

RT means Access runtime, as I used this term in the subject already, I assumed that every Body can follow.

PTquery is passthrough query which which I ussed the Long term one line above.

So I did not want to confuse anybody - but reading the thread I think everyone could follow.

Anyhow, I found the Problem and solved it, but it is very strange and it took me days, including thís day!

Solution:
on my developer machine I have Access 2010 SP2 and SQL Server 2012 Express.

On the customers machine there is an instance of SQL Server 2008 Express and Access runtime 2010 SP2.

While the SQL2012 can deliver pictures (only small logos), defined as datatype Varchar(max) from a stored procedure provided by a passthrough query in Access, the runtime seems to fail with it.

Access full Version also creates an error "Select Error :SQLSTATE = 01004 [MS SQL][ODBC Driver] data truncated "

The tricky Thing is that the error does not pup up at all (also without error handler). Only when you set the property of the passthrough query to "Log enabled" then it creates every time the passthrough query is called a table with large number of records all having this error description. So I detected this error step by step!

So when this logging is off, you will never discover this error - I assume.
When I deleted the field "logo" from the stored procedure the passthrough query worked a lot faster and showed the correct results on both machines!

Remains one question for me:
How to get the Content of a field with datatype varchar(max) - Memo in Access - in a Report from a SQL-table via a passthrough query?
Maybe only through filestream?

HTH
Michael
 

Users who are viewing this thread

Top Bottom