Go Back   Velocity Reviews > General Computer Discussion > Software
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
Old 12-19-2007, 02:20 PM   #1
Default


Please anybody help me........
I am trying to insert a record from HTML page controls (textbox ) to MS Access database. I am using following coade for that, but I am not geting result. Please anybody can guide me for these codes.

<html>

<head>

<title>Feedback Form</title>

<script type="text/javascript">

window.write("hello");

function getSubmit()
{
var name,email,comments;
name=name.value;
email=email.value;
comments=commnets.value;

var cn = new ActiveXobject("ADODB.Connection");

var rs = new ActiveXObject("ADODB.Recordset");

var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Documents and Settings\Velosys2-office\My Documents\feedback\Users.mdb";


var SQL = "INSERT INTO user_tbl(uName,Email,Comments) VALUES (" & _
"'" & name& "'," & _
"'" & email & "'," & _
"'" & commnets & "')"


cn.Open(strConn);
rs.Open(SQL, cn);
rs(1)=name.value;
rs(2)=email.value ;
rs(3)=comments.value;

rs.Close();
cn.Close();


}

</script>
</head>

<body>

<div align="center">
<table width="80%" border="0">
<td><b>FEEDBACK FORM</b></td>
<tr>
<td>Name :</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td>Email :</td>
<td> <input type="text" name="email"></td>
</tr>
<tr>
<td>Comments :</td>
<td><textarea name="comments"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="button" value="submit" onclick="getSubmit();"> </td>
</tr>
</table>
</div>

</body>
</html>

I tried with action in HTML codes too, I called another asp page with action ,but instead of running codes on that asp page it is just opening that asp page and asking to save/open that asp page.


hiralcp
hiralcp is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript not working in Html kgriffin General Help Related Topics 0 10-19-2008 10:46 PM
Store HTML table Values into Database subscribeid Software 0 09-05-2008 02:39 PM
how to write codes to connect access database using html codes hiralcp Software 0 12-18-2007 08:49 PM
CSS (& Javascript) - a:active ruffy Software 0 10-30-2006 06:53 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46