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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 PM_EMAIL field needs updating
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 28 March 2007 :  17:42:46  Show Profile
Having successfully installed Private Message Mod I wonder if there is a way to amend the Forum_Member table M_PMEMAIL field without having to download the whole database, amending it, and then having to upload.

I am looking to see if there is a way to use the admin options Alternate MOD setup and add a script that will execute to perform the database amendment.

What I am looking for is to amend the Forum_Members table in the
M_PMEMAIL field:
1. Set the default value in the properties to 1
2. Update all records to have a 1 in them

I don't know how to get the exact code, but looking at other dbs files something close to this might be there:

[ALTER]
MEMBERS
ALTER#M_PMEMAIL#int#NULL#1#
ALTER#M_PMEMAIL#default#1#

END

Obviously the green text is wrong but any solutions would be greatly appreciated.
Andy

Edited by - Andy Humm on 29 March 2007 10:13:19

AnonJr
Moderator

United States
5768 Posts

Posted - 29 March 2007 :  13:16:00  Show Profile  Visit AnonJr's Homepage
I'm a little too tied up working with some LMS-specific code at the moment, but I do know there is a DBS reference/guide floating around here that should serve to help you out. FWIW, I posted a PDF version of it some time back.
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 31 March 2007 :  14:56:14  Show Profile
I have managed to get the records all set to 1 by the following code in the Alternate MOD Set Up

[UPDATE]
MEMBERS
M_PMEMAIL#'1'#''
[END]

Item in red is new data
Items entered between #'' is the criteria for the search.
If it was a particular value we would put
M_PMEMAIL#'new data'#M_PMEMAIL='all that requires change'

The most important change I need is to set the default value of the M_PMEMAIL to 1
We'll get there one day.
regards andy

Edited by - Andy Humm on 31 March 2007 14:57:32
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 02 April 2007 :  11:33:52  Show Profile
What scripting language do we use for the Alternate Mod setup?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 02 April 2007 :  13:47:57  Show Profile  Visit HuwR's Homepage
the syntax is the same for dbs files and for the alternate mod setup, instructions can be found HERE
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 03 April 2007 :  06:43:11  Show Profile
Thank you that but I can not see where we can change the default value of a field
I am trying to set the MEMBERS table M_PMEMAIL field, default value in the properties to 1, incidentally the 'field type' is a number (long integar).
The following amends existing records to ensure all set to 1

[UPDATE]
MEMBERS
M_PMEMAIL#'1'#''
[END]

Appreciate the help
andy

Edited by - Andy Humm on 03 April 2007 06:44:44
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 04 April 2007 :  17:06:30  Show Profile
Since my last, I have tried the following in the Alternate MOD setup area:
[UPDATE] MEMBERS UPDATE#M_PMEMAIL#DEFAULT#1#[END]
or
[ALTER] MEMBERS ALTER#M_PMEMAIL#DEFAULT#1#[END]

Following the run it stated successfully updated, however, when I downloaded the db, checked the properties of the default value and they remained at 0

I also tried:
UPDATE VILLAGE SET E_HOUSE = 1"
again it says successful update but db has no change.
(At the top of the dialog it says
There were 0 lines of code
UPDATE MEMBERS SET M_PMEMAIL = 1"
Database setup finished


Someone on a different forum suggested I try this:
<%
Dim strSQL As String
strSQL = "UPDATE VILLAGE SET E_HOUSE = 1"
DoCmd.RunSQL strSQL
%>

But I got the following error:
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/forum/a1.asp, line 2
Dim strSQL As String
-----------^

Not totally familiar with asp, I put the code as a file a1.asp and opened it in the browser. But I think it may be a connection issue.
I believe the snitz Alternate MOD Setup box is the best method, but I am stuck with getting the right script, unless there is a dbs_ file available.
To sum up what I am after rather than reading the posts above:
I would like to amend is the MEMBERS table, M_PMEMAIL field (which a number type), by setting the Default Value to 1 in the properties
Any assistance would put this one to bed, and it would be greatly appreciated
andy
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 04 April 2007 :  21:33:44  Show Profile  Visit AnonJr's Homepage
VBScript declares everything as variant - you can't use the "As String" part. Other than that, it should run...

[edit]You may want to write out a string at the end that lets you know it succeeded...[/edit]


As for the DBS bit, I suspect that you can't put the whole thing on one line... but its been a while since I last played with it. Also, I'm not sure that the Alt. MOD Setup was intended to change the default value of a field... but I could be easily mistaken on that one.

Edited by - AnonJr on 04 April 2007 21:34:57
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 06 April 2007 :  09:41:32  Show Profile
AnonJr, regarding your thought that the Alternate Mod Setup not being available to adjust default values, I have even tried the suggested codes provide and placed them in a dbs_update.asp file and run from the norm MOD setup. Still the same symptoms. So it must be the code is wrong. I have tried the code in separate lines too ie
[UPDATE]
MEMBERS
SET M_PMEMAIL = '1'
[END]

so pondering to get it sorted...any clues please to the right code.
rgds andy

Edited by - Andy Humm on 06 April 2007 09:42:01
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 13 April 2007 :  07:36:23  Show Profile
Can you help on this one Shaggy - please!
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.44 seconds. Powered By: Snitz Forums 2000 Version 3.4.07