-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathzoho2.html
More file actions
43 lines (34 loc) · 984 Bytes
/
zoho2.html
File metadata and controls
43 lines (34 loc) · 984 Bytes
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
<html>
<head>
<title>Entitled Document</title>
<script language="JavaScript" >
function getSubmit()
{
var LastName;
var Firstn = names.value ;
var cn = new ActiveXObject("ADODB.Connection");
//here you must use forward slash to point strait
var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = ?F:\data.xls.xlsx";
var rs = new ActiveXObject("ADODB.Recordset");
//var SQL = "INSERT INTO Customers(FirstName, Surname)"
//+ " VALUES ( '"+ names.value +"', '" + surname.value +"')";
var SQL = "select Surname, DOB from Customers where FirstName = '" + Firstn + "'";
cn.Open(strConn);
rs.Open(SQL, cn);
surname.value = rs(0);
DOB.value = rs(1);
//alert(rs(0));
rs.Close();
cn.Close();
}
</script>
</head>
<body>
<input type="text" name="Name" />
<input type="text" name="Rollno" />
<input type="text" name="email" />
<input type="text" name="Mobile" />
<input type="button" value="submit" onclick="getSubmit()">
</body>
</html>
1