Author |
Topic |
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 19 February 2003 : 18:17:48
|
Ok, this was the only way I found to do it. You can change the starting ID value and the increment for an Access table, with a SQL statement like this:
ALTER TABLE TableName ALTER ColumnName COUNTER (NextDesiredIDValue,DesiredIncrementValue);
So to preserve the IDs you'd need to execute this statement before each record insertion. Of course, you'd also need to determine the last valid ID generated before the topic unarchiving started, so that you could set that value + 1 as the value for new records, after the unarchiving operation ended. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
msperry
Starting Member
USA
48 Posts |
Posted - 20 February 2003 : 15:17:01
|
Ok that sounds easy enough, I'll give it a try. |
- Michael NovaSheep.Com |
|
|
msperry
Starting Member
USA
48 Posts |
Posted - 20 February 2003 : 16:03:40
|
That didn't work. I received the following error message "Cannot change field 'TOPIC_ID'. It is part of one or more relationships."
|
- Michael NovaSheep.Com |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 20 February 2003 : 17:06:42
|
Yeah, I know. The relationships are not needed, many DBs work without them. Whether you decide to delete them or not is really your call. For that to work, you need to do it. If you don't do it, there is no way you can keep the original topic and reply ids.
Of course, from a point of view of mod installation, deleting the relationships maybe will difficult it, but I guess everything comes with a price... |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 20 February 2003 : 17:18:15
|
You can write some script to delete the relationships ... I've got a sample somewhere ... hold on ...
Okie dokie ... I found it ...
ALTER TABLE Table1 DROP CONTSTRAINT Table2Table1 (if the relationships were created in Access)
But I found out that doesn't always work. You need to know the name of the relationship. This can be found out by selecting to view systems objects under Tools, Options in Access. When I did that in an old 3.3.x database the relationship name looked like a SID, so I'm not sure if it will work. |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
Edited by - Nikkol on 20 February 2003 18:05:54 |
|
|
msperry
Starting Member
USA
48 Posts |
Posted - 21 February 2003 : 11:21:35
|
ok I'll try that and see if I can also rebuild the relationship afterward to the standard tables. |
- Michael NovaSheep.Com |
|
|
richfed
Average Member
United States
999 Posts |
Posted - 08 May 2003 : 12:56:50
|
Just wondering if there has, or will be, any resolution to the links "problem" with this mod?
If it's going to stay as it lays, for the foreseeable future, I think I'll go ahead & implement it as is, but if it'll be improved, I'll wait.
Any forecast?
Thanks!
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 08 May 2003 : 14:28:37
|
You can take another approach to overcome the problem which occur due to assigning of new ID's to topics which are unarchived. Create two new columns in the Topics table: 1. UNARCHIVED_FLAG 2. ORIG_TOPIC_ID
Then use values in these columns to fetch the correct record from the DB. |
|
|
Topic |
|