TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kundan Jha
764
1.1k
323.1k
JavaScripts function is not working ?
Oct 12 2015 8:42 AM
<script type="text/javascript">
function save() {
var name = document.getElementById("txt_Name").value;
var salary= document.getElementById("txt_salary").value;
var Objconnection = new ActiveXObject("ADODB.Connection");
var connectionstring = "Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\Kundan\Documents\Visual Studio 2013\DataBase\MyDatabase.mdf;Integrated Security=True"";
Objconnection.Open(connectionstring);
var rs = new ActiveXObject("ADODB.Recordset");
var query = "insert into employees values('"+name+"','"+salary+"')";
rs.Execute(query,Objconnection);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
Name :
<input type="text" id="txt_Name" /><br />
Password:
<input type="text" id="txt_salary" /><br />
<button id="btnsave" value="SaveusingJvaScripts" name="SaveusingJvaScripts" onclick="save()">SaveusingJvaScripts</button>
</div>
</form>
</body>
Reply
Answers (
4
)
How to validate Excel sheet column names with SQL- table col
Why should we prefered with AngularJS framework ?