Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: UnArchive (Restoration) Topics
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 19 February 2003 :  18:17:48  Show Profile  Send ruirib a Yahoo! Message
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
Go to Top of Page

msperry
Starting Member

USA
48 Posts

Posted - 20 February 2003 :  15:17:01  Show Profile  Visit msperry's Homepage
Ok that sounds easy enough, I'll give it a try.

- Michael
NovaSheep.Com
Go to Top of Page

msperry
Starting Member

USA
48 Posts

Posted - 20 February 2003 :  16:03:40  Show Profile  Visit msperry's Homepage
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
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 20 February 2003 :  17:06:42  Show Profile  Send ruirib a Yahoo! Message
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
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 20 February 2003 :  17:18:15  Show Profile
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
Go to Top of Page

msperry
Starting Member

USA
48 Posts

Posted - 21 February 2003 :  11:21:35  Show Profile  Visit msperry's Homepage
ok I'll try that and see if I can also rebuild the relationship afterward to the standard tables.

- Michael
NovaSheep.Com
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 08 May 2003 :  12:56:50  Show Profile  Visit richfed's Homepage
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!

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 08 May 2003 :  14:28:37  Show Profile
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.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07