Solved

getting the results to go to an database

Posted on 1998-04-14
14
199 Views
Last Modified: 2013-12-25
I am writing a web database to gather information on employee traveling routines. What is the best way to do an online questionnaire and record the results ? (ideally i would like to record the results in a database)

Cheers

Itssbell

0
Comment
Question by:itssbell
  • 7
  • 4
  • 2
  • +1
14 Comments
 
LVL 1

Expert Comment

by:jello
Comment Utility
There are a few ways to handle this type of process on the Web.  It is becoming very common to use Microsoft Active Server Pages to pass information to and from an ODBC compliant database.  MY particular method of choice is to use Cold Fusion (available at www.allaire.com)  To pass information back and forth.  Cold Fusion uses its own hybrid language (CFML) which is a hybrid between standard SQL commands and HTML.  I found it easy to learn and both flexible and scalable enough to suit my needs.
Let me know if you need more information.
0
 

Author Comment

by:itssbell
Comment Utility
How would i use Active Server pages  ?
0
 
LVL 1

Expert Comment

by:jello
Comment Utility
There's a comprehensive online tutorial located at:
http://www.activeserverpages.com/learn
0
 

Expert Comment

by:NetW3
Comment Utility
You don't specify your operating system, but if you are using a Unix system, you
can try using mSQL from Hugues technologies. mSQL is an alternative to the high-end
commercial software and is useful in smaller scale applications. Cold Fusion, as
suggsted above, is a very powerful app that works with NT and with Unix (well,
just with Solaris 2.5.x at this point) and will most certainly meet your needs.

Just use HTML forms to pass named information into your database application,
running as a service on NT or through CGI on a Unix system.

Perhaps specifying your base OS, web server type, and the scope of your work would
be helpful for future answers. If you have higher end requirements, something like
Oracle would be useful, if you are midrange, something like Lotus Notes/Domino may
serve(r) you well. If you have low end requirements, mSQL may get you by.

Please let us know your situation. Thanks, Curt

0
 

Author Comment

by:itssbell
Comment Utility
I am using an NT system with IIS 4.0 installed

itssbell
0
 
LVL 5

Accepted Solution

by:
bin_huwairib earned 220 total points
Comment Utility
itssbell,

Here is how to use Active Server Page, all the points below have to be on the server side.

1 - Create a file named "default.htm" and paste in it the following:

<HTML>
<HEAD>
</HEAD>
<BODY>
<H2>Employee Information</H2>
<FORM NAME="Emp_Form" ACTION="Submit.asp" METHOD="POST">
<P>Employee Name: <INPUT TYPE="Text" NAME="Emp_Name" SIZE="16"></P>
<P>Employee Address: <INPUT TYPE="Text" NAME="Emp_Address" SIZE="16"></P>
<P>Telephone No.: <INPUT TYPE="Text" NAME="Emp_Tel" SIZE="16"><P>
<P></P>
<INPUT TYPE="submit" NAME="Submit" VALUE="Submit">
<INPUT TYPE="reset" NAME="Reset" VALUE="Reset">
</FORM>
</BODY>
</HTML>

2 - Create another file named "submit.asp" and paste in it the following:

<%@ LANGUAGE="VBSCRIPT" %>

<HTML>
<%
 Set Conn = Server.CreateObject("ADODB.Connection")
 Conn.Open "employee"
 Conn.Execute("INSERT INTO EmployeeInfo (Emp_Name, Emp_Address, Emp_Tel) " & _
               "VALUES('" & Request("Emp_Name") & "','" & Request("Emp_Address") & _
               "','" & Request("Emp_Tel") & "')")
 Conn.Close
 Set Conn=Nothing
%>

<BODY>
 <SCRIPT Language="JavaScript">
 <!--
  function goDefault()
  {
        window.location.href = "default.htm";
  }
 // -->
 </SCRIPT>

<H3>Employee Information was saved sucessfully.</H1>
<p><INPUT TYPE="button" VALUE="Click here to go to Employee Information"
NAME="GoDef" ONCLICK="return goDefault()"></P>
</BODY>
</HTML>

3 - Create MS Access Database named "emp" and create a table called "employeeinfo", this table will consist of three fields Emp_Name, Emp_Address and Emp_Tel.

4 - Create an ODBC data source named "employee" (Microsoft Access Driver) to be pointed to "emp" database which was created in step 3.

This sample have three fields only, you can expand it as much as you can.


Best regards,
Bin Huwairib
0
 

Author Comment

by:itssbell
Comment Utility
Using your code i got an error message -

270 (0x0000010e)

 I think its because i haven't set up the ODBC database up properly - can explain in a bit more depth how i set this up

Thanks a lot

Itssbell
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 5

Expert Comment

by:bin_huwairib
Comment Utility
itssbell,

Do the following steps on your server machine:

1 - Goto the (Settings/Control Panel) then double click on the ODBC icon.
2 - Goto (System DSN) tab and click on (Add) button.
3 - Select "Microsoft Access Driver (*.mdb)" then click on (Finish).
4 - Enter "employee" in (Data Source Name) text box.
5 - Click on select and choose "emp" database (assuming that you created "emp" database -check step no.3 in the previous answer-).
6 - Click OK.

That is all, please let me know if you require any other details.


Best regards
Bin Huwairib
0
 

Author Comment

by:itssbell
Comment Utility
I have followed your instructions to create the odbc database called employee, but its still coming up with the same error.

THe URL is

www.wkac.ac.uk/webdomain/default.htm

Thanks for your help so far

Itssbell
0
 
LVL 5

Expert Comment

by:bin_huwairib
Comment Utility
itssbel,

It's nothing to do with the ODBC database, look at this artical it might help you.


PSS ID Number: Q180710

SYMPTOMS
========
 
When a user makes a request for a Web page from Microsoft Internet
Information Server (IIS), the server reports an error 270 (0x0000010e) in
the browser.
 
CAUSE
=====
 
This error occurs because an application is running in the IIS process's
memory space. The application is modifying threads within the process to a
thread type called Apartment Model Threading. When the application is ready
to return control of the thread, the application does not convert the
thread back to a "free threaded" thread. This causes IIS to experience a
memory exception error and reports it to the browser.
 
WORKAROUND
==========
 
To work around the problem, determine which component is causing the
problem and either fix it or do not use it.
 
Custom-developed components can cause the problem. You should also check
for any ISAPI (for example, a filter or .dll file) or an ActiveX object
that may use the IIS thread pool, and remove or repair them.
 
STATUS
======
 
Microsoft is researching this problem and will post new information here in
the Microsoft Knowledge Base as it becomes available.
 
MORE INFORMATION
================
 
To determine which ISAPI filters are currently in use on the system, you
will need to use Registry Editor. Start Registry Editor (Regedt32.exe) and
locate the following registry key:
 
   HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/W3SVC/Parameters
 
Find the value "Filter DLLs" and double-click it. The Edit Value dialog box
appears. If the value is selected, clear the highlighting before you
attempt to view it. (To clear the selection, press the left or right arrow
key.) Filter DLLs that are in use will be listed by path and file name,
separated by a comma. By default, IIS installs the ISAPI filter
Sspifilt.dll. Both versions of Microsoft Proxy Server, if installed on the
system, will include a filter named W3proxy.dll. These do not cause this
problem and should be left in place.


Best regards
Bin Huwairib
0
 

Author Comment

by:itssbell
Comment Utility
so is there a patch/fix/update for it ?

Cheers Itssbell
0
 
LVL 5

Expert Comment

by:bin_huwairib
Comment Utility
itssbell,

Which version of IIS installed on your server.

Bin Huwairib
0
 

Author Comment

by:itssbell
Comment Utility
IIS 4.0

cheers

Itssbell
0
 

Author Comment

by:itssbell
Comment Utility
Thanks for all your help - you have been a star
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now