Author |
Topic  |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 27 September 2003 : 20:38:52
|
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 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 27 September 2003 : 23:16:08
|
Good link, but I am afraid thats over my head. Thanks tho. |
-=NiteOwl=-
|
 |
|
The Impact
Junior Member
 
Australia
398 Posts |
Posted - 27 September 2003 : 23:52:49
|
You might like to take the SQL lessons, they are pretty usefull.
Not sure if that will help either though.  |
 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 28 September 2003 : 00:07:21
|
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=-
|
 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 28 September 2003 : 01:33:44
|
Oh no, I am starting to like this! It's working. . . . |
-=NiteOwl=-
|
 |
|
The Impact
Junior Member
 
Australia
398 Posts |
Posted - 28 September 2003 : 02:53:10
|
Congrats, could you post a link to the finished result when it's done ?  |
 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 28 September 2003 : 03:06:28
|
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=-
|
 |
|
The Impact
Junior Member
 
Australia
398 Posts |
Posted - 28 September 2003 : 03:23:32
|
I know next to nothing about MySQL but I didn't think that you use a ODBC driver ? |
 |
|
|
Topic  |
|