Avatar billede krestensb Nybegynder
19. november 2013 - 16:47 Der er 13 kommentarer og
1 løsning

Databasen "" kan ikke åbnes. Det er måske en database, som programmet ikke genkender, eller filen kan være beskadiget.

Hej,
Jeg får følgenden fejlmelding når jeg forsøger at køre eller gemme forespørgsler i min database:

"Databasen "" kan ikke åbnes. Det er måske en database, som programmet ikke genkender, eller filen kan være beskadiget."

Er der nogen der kender til problemet?

Mvh Kresten Skovsted Buch
Avatar billede terry Ekspert
19. november 2013 - 17:00 #1
try compact repair.
Avatar billede Slettet bruger
19. november 2013 - 17:55 #3
Opret en genvej til din database, gaa i egenskaber og tilfoej mellemrum /compile til stien.

Brug genvejen og se om det faar orden paa databasen!~)
Avatar billede krestensb Nybegynder
20. november 2013 - 00:18 #4
Jeg kunne godt køre en compact repair, og det vil jeg også gøre i morgen, men databasen er helt ny. Den er bygget op af data fra tabeller der linker via odbc. Det sker ca. hver gang jeg bygger databasen.

Det burde ikke være nødvendigt, eller tager jeg fejl?
Avatar billede terry Ekspert
20. november 2013 - 08:46 #5
" Det sker ca. hver gang jeg bygger databasen."

Do you mean "compile"?


Its shouldn't be necessary to compact/repair the dB all the time so something is obviously wrong.

"Jeg får følgenden fejlmelding når jeg forsøger at køre eller gemme forespørgsler i min database"

How can you do this if you cant access (get into) the dB?

Are you using some other programming language to access data in the dB? If that's the case then its here you need to look for the problem I think.
Avatar billede krestensb Nybegynder
20. november 2013 - 09:05 #6
No, I don't mean compile, there is no VBA code to compile in the db. I have som querry's taking data from some linked tables building some new tables.

I do get into my db. That's what's strange.

I get the message when I try to do somthing with the db, like saving something or running a querry.

Some times i get the message:

"Databasen "aggregate type" kan ikke åbnes." I don't know what "aggregate type" meanss.
Avatar billede terry Ekspert
20. november 2013 - 09:29 #7
aggregate http://www.thefreedictionary.com/aggregate

I guess your grouping records and maybe summing (adding) values.

When you get the error is it when doing operations with the linked tables?

Its years since I played around with linked tables but I seem to remember that problems can occur. Data types are different so can give problems.

What database type are your linked tables from?
Avatar billede krestensb Nybegynder
20. november 2013 - 09:35 #8
I do both. Most of the querrys include some linked tables. They come from an oracle db.

I have no access to change anything in the linked tables.

Anything that can be done?
Avatar billede terry Ekspert
20. november 2013 - 09:51 #9
Not sure if it will help but try looking at pass through queries.
It will help in performance too.

If your not working with great amounts of data and only reading then maybe copying the required information to local tables and working with these could help.

Otherwise I think you will have to try and find out if its a specific data type from Oracle which is causing the problem and try and convert it in the query before using it in aggregates.
Avatar billede krestensb Nybegynder
20. november 2013 - 11:48 #10
I don't know what a "pass through querie" is. Could you explain it to me?

I'm trying right now to copy all the linked tables to local, but some of them are big so it's not a good solution. It taks to long time, but if it works, it works.

how would you look for the datatype thats causing the problems?
Avatar billede terry Ekspert
20. november 2013 - 13:05 #11
Here's an article on passthrough queries. I guess your using a newer version of Access but its very similar.

http://www.mssqltips.com/sqlservertip/1482/microsoft-access-pass-through-queries-to-sql-server/

The problem may have nothing to do with  datatypes.

I'd start by making a very simple  query to see if I can provoke the error and slowly add fields/calculations until the error occurs.
Avatar billede krestensb Nybegynder
20. november 2013 - 13:49 #12
Thanks for the link. Sadly it seams like I can't make a passthrough queries to my oracle db. I behind Citrix and a lot of security. Would I be right to asume that t-sql will only work for a sql-server and not for at oracle server?

Thanks for your help, at least I have learned a lot.
Drop an answer.
Avatar billede terry Ekspert
20. november 2013 - 14:25 #13
If you can link the tables from the Oracle dB then you should also be able to create pass-through query. Its not that difficult :-) Give it a try some time.
Avatar billede terry Ekspert
20. november 2013 - 16:24 #14
thanks.

missed your question regarding T-SQL, sorry.

http://en.wikipedia.org/wiki/Transact-SQL

Just Microsoft and Sybase which in fact Microsoft originated from.

You can't use T-SQL in your Access dB but you in your SQL server.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester