08. marts 2003 - 17:41Der er
17 kommentarer og 1 løsning
Eksport og Import i *.txt format
Hej Eksperter Har hørt rygter om at man kan eksportere sine ændringer i tabellerne og på en anden bruger impotere same ændringer. Er der nogen som kender noget til det? Eksport/Import skulle ske via txt filer? Jan
well here is one thing which may need concidering When you replicate a database, any incremental AutoNumber fields in your tables change to random numbering. All AutoNumber fields in existing records retain their values, but AutoNumber values for inserted records are random. In other words, the record numbers don't reflect the order in which the records were inserted and, consequently, the record inserted last doesn't necessarily have the highest value.
Before you replicate a database, determine whether any of your applications or users rely on an AutoNumber field's incremental numbering. If so, you can use an additional Date/Time field to provide sequential ordering information.
Without more information on what it is you want to do then we would just be guessing. Do all users have read/write access to all records or are they only allowed to update a subset of the data? If they can read/write ALL records then update conflicts will occur where you some how have to decide which updates to accept. Replication may at first glance seem to be a difficult approach, but it may be worth looking at more closely. Using a little time on this might in fact be the quickest solution and the most reliable in the end.
Ang. Autonumbers, så bør man aldrig lægge nogen logik i forbindelse med aunummerering. Autonummeringsfelter bør kun bruges som nøglefelter og til at refereres til en given post. Man bør således ikke gå ud fra som givet, at de er fortløbende.
Jan your comment 19:57:48 doesnt tell us much at all. We have NO idea what your database contains and what it is you want to update so we need further information before we can make any suggestions. You have to concider which records are getting updated/added. Do the same records exist in BOTH databases and if so will they be getting updated BOTH ways? If they are getting updated both ways then WHICH one gets accepted. What about autonumber fields? The same number MAY exists in both databases but for two different records. Only you know this information Jan and you need to concider these and more han likely other things too before we can do much to help.
Hi 'terry' . Begge back-end er identiske. Den ene er der hvor brugeren indtaster information den anden er der hvor man kan læse informationerne og bruge dem, hvis man har behov for dette. Det er derfor kun den ene back-end som skal opdateres med data fra den første back-end Jan
well the easiest solution is to campactthe backend which contains the new data and send this in an email which you just copy over the "READ ONLY" backend.
'terry' Mit problem er at hastigheden på e-mailen kun er 9600 baud, det er over mobil telefon. Min backend er p.t 25 mb. Så den kan ikke sendes. Så er der andre foreslag. Hvor er 'hugopedersen'
Lets say you have a datetime field in the tables you want to send. The default value is set to Now() so that when you create a new rcord it gets added. Then when you change a record you need to update this field with the current date time. Now you make aquery which selects records where this date is newer than the last time you made an export. This date can be in an extra table/field and gets updated every time you export. Now you need a routine which exports this data into a text file. Now in the receiving dB you need to make some routine which IMPORTS the text file into a TEMP a TEMP table and then you need I would think two queries for appending those which DO NOT exist and updateing thise which do. Easy IKKE?
Jeg ville udelukkende operere med textfiler i store træk således:
Når du starter laver du textfiler af alle tabeller. Brug TAB, Chr$(9), som skilletegn mellem felter og vbCrLf(linjeskift), som skilletegn mellem poster. Filtypen er .tab.
Når du skal sende ændringer, laver du tilsvarende filer for de aktuelle tabeller i databasen. De gamle og nye textfiler sammenlignes og poster, der ikke er ens gemmes i et 3. sæt filer. Husk at omdøbe filerne, så du altid ved hvad for fil, du skal bruge ved næste ændring. Modtageren importerer rettelserne til Access, sletter alle poster med rettelser og tilføjer de nye poster. Det er vigtigt at alle tabeller har et unikt IDnr(autonummerering) og nemmest at håntere, hvis det altid er det første felt.
Se under "Open Statement" i Visual Basic Help hvordan man gør. Gem filerne som "Binary", den simpleste måde at gemme en textblok på.
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.