This topic is locked

Creating Folder when add value

1/19/2005 5:08:19 AM
ASPRunnerPro General questions
E
Eybe author

Hi,
i'm trying to do a tricky thing (for me) :
I want to automate the creation of a folder when i add values into my DB. This one would bear the name of one of the fields inserted in the table.
How can I proceed ?

Add some lines into the *_edit.asp page ?

Call another asp page ?
I someone could help me.
I specify that I am not developer.
Alex.

Sergey Kornilov admin 1/22/2005

Hi,
you can use something like (see ..._add.asp file). In this example I create a folder on C drive named after UserName field.

strSQL = strSQL & strFields & " values " & strValues

LogInfo(strSQL)

dbConnection.Execute strSQL

Call ReportError


Dim fso, f

Set fso = CreateObject("Scripting.FileSystemObject")

Set f = fso.CreateFolder("c:\" & Request.Form("UserName"))

message="<div class=message><<< Record was added >>></div>"