Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Advice for online request forms? 1

Status
Not open for further replies.

Caustic

MIS
Jun 20, 2001
77
US
I've created a form for use on my company intranet to take Help Requests from our users. Aside from some scattered web development, batch files and basic VB, I'm more of an administrator than a programmer. Any advice you could offer would be appreciated.

I would like the data from this form to be submitted to a .csv file or stored in a database or bring XML scripts in. Either way I'll want to query it later via a web page. That way unresolved Help Requests can be viewed via a web interface.

Any ideas on how I might go about this? SQL isn't available and I'd like to avoid doing anything with Frontpage.
 
using a access DB would be basically easy for this. Did you need help with the writing of the script or no?
Sounds pretty basic.
insert the form into the DB.
view with a select statment. I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
Scripting help would be fantastic. The fields all have unique IDs, I just wasn't sure how to get the information into a database. Thanks for the help.
 
this will get you started

'connect to the DB here
Set ConnectionToDatabase=Server.CreateObject("ADODB.Connection")
connectionToDatabase.ConnectionTimeout=60
connectionToDatabase.Open "DSN=[DB]"
'get the data
Set recordSet=Server.CreateObject("ADODB.Recordset")
recordset.Open "SELECT * FROM
", connectionToDatabase
'that opened the table using the execute function

'this loops through all the fields and writes them
Do while not Recordset.EOF
for x=0 to Recordset.Fields.count-1
Response.Write(Recordset(x))
next 'so we populate all the records
Recordset.MoveNext
Loop
' thats how you view the DB


'here's how you will insert the form into the DB

set conn = server.createobject("adodb.connection")
conn.open "DSN=[DB]"
Set Recordset=Server.CreateObject("ADODB.Recordset")
Recordset.Open "
", conn, 1, 2
Recordset.AddNew
'many ways to do the add
'below takes the column (field name) in the DB and adds the form value to it
Recordset("field")=(Request.Form("[name field]")
' add more to this as needed
Recordset.Update
Conn.Close
set Conn=nothing
' always close the connection

' thats pretty much it. hopefully I didn't forget something
'make sense ???? if you need more specifice. give the form names etcc... I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
That's perfect. I think I can fill in the rest. Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top