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
 User Fields MOD
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

NiteOwl
Junior Member

Canada
403 Posts

Posted - 27 September 2003 :  20:38:52  Show Profile  Visit NiteOwl's Homepage
There was a mod that was linked from this site to HwR, but the link was broken, I finally tracked the MOD down and it worked very well with msAccess. I now would like to use it in MySQL the MOD came with a file called myupdate.asp which contained the following code: can anyone suggest the changes to make it work with MySQL?

===============Start-User Fields========================
<!--#include file="config.asp"-->
<!--#include file="inc_func_common.asp"-->
<%
set my_Conn= Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString

'Table Creation scripts..

my_conn.execute ("CREATE TABLE FORUM_MEMBERFIELDS( MEMBER_ID int NOT NULL , USR_FIELD_ID smallint NOT NULL , USR_VALUE varchar (50) NULL )")

'Table Creation scripts..

my_conn.execute ("CREATE TABLE FORUM_USERFIELDS( USR_FIELD_ID int IDENTITY (1, 1) NOT NULL , USR_LABEL varchar (40) NULL , USR_FIELDTYPE varchar (1) NULL , USR_SHORTNAME varchar (10) NOT NULL )")

'Alter Table Scripts..

my_conn.execute ("ALTER TABLE FORUM_USERFIELDS ADD USR_DESC varchar (100) NULL ")
my_conn.execute ("ALTER TABLE FORUM_USERFIELDS ADD USR_VALUES varchar (255) NULL ")
my_conn.execute ("ALTER TABLE FORUM_USERFIELDS ADD USR_DEFAULT varchar (100) NULL ")
my_conn.execute ("ALTER TABLE FORUM_USERFIELDS ADD USR_OPTIONAL int NULL DEFAULT 1")
my_conn.execute ("UPDATE FORUM_USERFIELDS SET USR_OPTIONAL=1")
my_conn.execute ("ALTER TABLE FORUM_USERFIELDS ADD USR_PRIVATE int NULL DEFAULT 0")
my_conn.execute ("UPDATE FORUM_USERFIELDS SET USR_PRIVATE=0")

'Table Insert scripts..

my_conn.execute ("INSERT INTO FORUM_CONFIG_NEW (C_VARIABLE,C_VALUE) VALUES ('StrUserFields','1')")

my_conn.close
set my_Conn= nothing

%>
===============END-User Fields========================

-=NiteOwl=-

The Impact
Junior Member

Australia
398 Posts

Posted - 27 September 2003 :  21:04:03  Show Profile
You might like to have a read of this :
http://www.w3schools.com/sql/sql_functions.asp

Has descriptions of SQL and Access functions. Might be usefull ...
Go to Top of Page

NiteOwl
Junior Member

Canada
403 Posts

Posted - 27 September 2003 :  23:16:08  Show Profile  Visit NiteOwl's Homepage
Good link, but I am afraid thats over my head. Thanks tho.

-=NiteOwl=-
Go to Top of Page

The Impact
Junior Member

Australia
398 Posts

Posted - 27 September 2003 :  23:52:49  Show Profile
You might like to take the SQL lessons, they are pretty usefull.

Not sure if that will help either though.
Go to Top of Page

NiteOwl
Junior Member

Canada
403 Posts

Posted - 28 September 2003 :  00:07:21  Show Profile  Visit NiteOwl's Homepage
well . . I may have spoken too soon, the file is actually not that bad in telling me what I have to do, I may not be able to automate it, BUT it looks like I can build the tables by hand, I am in the middle of that now. grin

-=NiteOwl=-
Go to Top of Page

NiteOwl
Junior Member

Canada
403 Posts

Posted - 28 September 2003 :  01:33:44  Show Profile  Visit NiteOwl's Homepage
Oh no, I am starting to like this! It's working. . . .

-=NiteOwl=-
Go to Top of Page

The Impact
Junior Member

Australia
398 Posts

Posted - 28 September 2003 :  02:53:10  Show Profile
Congrats, could you post a link to the finished result when it's done ?
Go to Top of Page

NiteOwl
Junior Member

Canada
403 Posts

Posted - 28 September 2003 :  03:06:28  Show Profile  Visit NiteOwl's Homepage
I had this MOD working very well in a msAccess environment, it had been enhanced by Crash for another fellow as it seemed to have some problems. The finished product was very cool!

I then moved to MySQL, Even though I have built the tables, I am having errors with a file that is not MODed by me, it came with the original pkg, I can only assume that the problem is related to MySQL. This is not a simple MOD and is certainly beyond my editing abilities. I will likely have to wit for the changes to be made to the code before it will do me much good, its a pity as this is one pretty nice bit of work. My error was this if anyone is interested.

Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
ODBC driver does not support the requested properties.
/members/snitzDEV/admin_user_fields.asp, line 27

-=NiteOwl=-
Go to Top of Page

The Impact
Junior Member

Australia
398 Posts

Posted - 28 September 2003 :  03:23:32  Show Profile
I know next to nothing about MySQL but I didn't think that you use a ODBC driver ?
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 1.7 seconds. Powered By: Snitz Forums 2000 Version 3.4.07