Avatar billede leandernielsen Nybegynder
27. august 2008 - 17:36 Der er 18 kommentarer og
1 løsning

Hvordan finder man en schema.ini fil

Hej,

Jeg har en makro der bruger en schema.ini til import af en tekst fil. Jeg ved filen findes, da makroen ikke virker hvis jeg fjerner den fra specification name.

Jeg skal bruge den samme schema.ini fil til en anden makro, saa jeg har brug for at finde den. Hvordan goer jeg det?
Avatar billede terry Ekspert
27. august 2008 - 18:27 #1
Avatar billede terry Ekspert
27. august 2008 - 18:48 #2
"...da makroen ikke virker hvis jeg fjerner den fra specification name."

Import specifications are stored in the dB, so removing the specification name only means that the macro doesnt use the specification.

You can alter the specification by importing the file manually and then press the "Advanced" button when it appears. Then you can choose the specification from a list.
Avatar billede leandernielsen Nybegynder
28. august 2008 - 15:13 #3
Terry. Det har desvaerre ikke hjulpet, saa jeg har fundet en anden loesning. jeg lukker spm.
Avatar billede terry Ekspert
28. august 2008 - 19:24 #4
Whats the other solution?
Avatar billede leandernielsen Nybegynder
29. august 2008 - 09:14 #5
I copied the original DB where the schema.ini file worked fine and pasted it in the new folder, and afterwards I made the ammendments in the pasted DB.

It was not very smooth, but it works. So I think that the schema.ini file is saved directly in the original DB. But I don't know where??

But I would like to understand where that could be. I could open a new question if You would like?
Avatar billede terry Ekspert
29. august 2008 - 10:39 #6
Actually I dont think that the import uses a schema.ini, I am very sure it uses an import specification.

Import specifications are NOT the same as schema.ini and they are stored in the dB. So replacing the dB with the oringinal will obviously solve your problem.

schema.ini files are normally stored in the same folder as the text file you are importing.
Avatar billede leandernielsen Nybegynder
29. august 2008 - 10:41 #7
That makes sense, and you are right. But I thought it was the same (schema.ini and import specification).

Do you where this normally is stored?
Avatar billede terry Ekspert
29. august 2008 - 10:59 #8
"Do you where this normally is stored?"

I assume you mean the import spec.? Its stored internally in the dB. Its not something you can get your hands on directly. You can alter it through th eimport wizrad and yo can import them into another dB the same as when you import other objects.

If it exists in the original dB and you use this for new versions then there should be no risk of it getting removed. Is this what you are concerned about?
Avatar billede leandernielsen Nybegynder
29. august 2008 - 11:09 #9
It was the import spec.
I am concerned about if I need to change it, because I in that case need to export it.

Do you know how to do that?
Avatar billede terry Ekspert
29. august 2008 - 11:15 #10
I dont know how you currenty distribute new versions of your dB, but if you make alterations to the original and then copy it to other PC's then you would do it exactly the same. Make the changes to the import spec in the original and then copy the dB to the other pc's. Maybe you can explain how you do it?
Avatar billede leandernielsen Nybegynder
29. august 2008 - 11:23 #11
The problem is that I don't have the original import spec. as the DB has been handed over to me after having changed hands many times.
Avatar billede terry Ekspert
29. august 2008 - 11:33 #12
Can you explain how you distribute new versions of your dB?
Avatar billede leandernielsen Nybegynder
29. august 2008 - 11:37 #13
??
Avatar billede terry Ekspert
29. august 2008 - 11:56 #14
You said that you copied the original dB to the new folder and now it works. I sthe dB intended only for your use or will other users also use it?


If other users will use it too then how do you give them it?
Avatar billede leandernielsen Nybegynder
29. august 2008 - 12:01 #15
I am the only user.
Avatar billede terry Ekspert
29. august 2008 - 12:18 #16
Then you dont have a problem. If you make changes to the import spec then make a backup of your dB just in case things go wrong.

Or am I completely off track??
Avatar billede leandernielsen Nybegynder
29. august 2008 - 13:29 #17
My problem is that I don't:
1)Know where the import spec is in the DB
2)Know How to export it
3)Have a copy of the import spec file

So I can't make changes to it. Right know I don't have to, so it is not a problem currently. But maybe I have to make changes in the future, and in that case will it be a problem.
Avatar billede terry Ekspert
29. august 2008 - 19:42 #18
I think you are missing something!
1) You dont need to know where it is but this SQl should show you some information of them.

SELECT MSysIMEXSpecs.SpecName, MSysIMEXColumns.FieldName, MSysIMEXColumns.Start, MSysIMEXColumns.Width, MSysIMEXColumns.SkipColumn
FROM MSysIMEXColumns INNER JOIN MSysIMEXSpecs ON MSysIMEXColumns.SpecID = MSysIMEXSpecs.SpecID
ORDER BY MSysIMEXSpecs.SpecName, MSysIMEXColumns.Start, MSysIMEXColumns.Width;

2) You dont need to export it
3) Make a copy of the dB then you have a copy of the import spec. You can also delete verything else you dont want a backup of (tables/queries etc.) but I dont see the point in that, having a backup is a good idea.

If you need to make changes to it then you can make the cahnegs and than make a copy for you backup.
If you need to restore import spec from you backup you will first nned to delete the original and then import it again from the backup.

http://support.microsoft.com/kb/208991
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