This example assumes a DSN called USERS that ponts to an SQL DB Table called USERS. 
This is the stored procedure example:

CREATE PROCEDURE NEWUSER 

@USERID varchar(15), 
@PASSWORD varchar(15), 
@LASTNAME varchar(50), 
@FIRSTNAME varchar(50), 
@COUNTRY varchar(50), 
@AGE varchar(5), 
@PQUESTION varchar(100), 
@PANSWER varchar(100)

AS

INSERT USERS 
(USERID,PASSWORD,LASTNAME,FIRSTNAME,COUNTRY,AGE,PQUESTION,PANSWER,MAILADDR,MAXSIZE)
values(@USERID,@PASSWORD,@LASTNAME,@FIRSTNAME,@COUNTRY,@AGE,@PQUESTION,@PANSWER,@USERID
 + '@domain.com',4000000)
GO

The ASP code looks like this:

Set DataConn = Server.CreateObject("ADODB.Connection") 
Set CmdSimpleSelect = Server.CreateObject("ADODB.Recordset") 
DataConn.Open "DSN=USERS;uid=USERID;pwd=PASSWORD"

MYSQL = "EXEC NEWUSER @USERID = '" & USERID & "', @LASTNAME = '" & LASTNAME & "', 
@PASSWORD = '" & PASSWD1 & "' , @FIRSTNAME = '" & FIRSTNAME & "', @COUNTRY = '" & 
COUNTRY & "', @AGE = '" & AGE & "', @PQUESTION = '" & PQUESTION & "', @PANSWER = '" & 
PANSWER & "'"

CmdSimpleSelect.Open MYSQL, DataConn 


You would, of course, need to tweak this to fit your environment but perhaps it's a 
start!



---------- Original Message ----------------------------------
From: Nad Cyrus <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Mon, 20 Dec 1999 10:16:44 -0400

>Thanks so much Salvatore.
>
>Yes I would definitely like to see the code.
>
>Nad
>
>-----Original Message-----
>From: Salvatore Giacinto [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 20, 1999 10:03 AM
>To: [EMAIL PROTECTED]
>Subject: Re: [IMail Forum] Imail and Active server pages
>
>
>---------- Original Message ----------------------------------
>From: Nad Cyrus <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>Date: Mon, 20 Dec 1999 09:56:10 -0400
>
>>Hello and seasons greetings.
>>
>>I am looking for a tool that will allow me to add an imail email account,
>>via ASP
>>I would like to be able to setup a template where I can control the size of
>>the new account (in Mbs)
>>or number of message allowed.
>>The user would also be able to setup their password, preferences etc.
>>
>>It would be handy to be able to create an alias via asp instead.
>>
>>Does anyone know of a suitable solution?
>>
>>Thanks in advance.
>>Nad Cyrus, MCP
>>
>>Please visit http://www.ipswitch.com/support/mailing-lists.html 
>>to be removed from this list.
>
>
>Check the site www.blinkmail.com - here is a good example of a "hotmail"
>type setup where users can create their own accounts via ASP. The way it
>works is an ASP page calls an extended procedure on the SQL server passing
>variables from the web form. The stored procedure inserts a new record
>assigning values based on the variables.  Some fields in the SQL table are
>set up with default values, i.e. MAXSIZE = 4000000 for 4 meg limit, FLAGS =
>128 to allow web access, and so on, so when a new record is created, the
>appropriate fields automatically have these values.
>
>Let me know if you want to see the code. 
>
>S. Giacinto    
>Please visit http://www.ipswitch.com/support/mailing-lists.html 
>to be removed from this list.
>Please visit http://www.ipswitch.com/support/mailing-lists.html 
>to be removed from this list.
>
Please visit http://www.ipswitch.com/support/mailing-lists.html 
to be removed from this list.

Reply via email to