How to insert the records in a database table by using ASP?
Submitted by: Administrator<%
'Open a Connection with database
Dim DSN
DSN="Provider=SQLOLEDB.1; Persist security info=false; user id=sa; password=main; initial catalog=database name Data Source=localhost"
set objCon=Server.CreateObject("ADODB.Connection")
objCon.Open DSN
%>
<%
'Get the Query
Dim SQL
SQL="insert into tablename values('a','b','c')"
%>
<%
'Insert Into Database
objCon.Execute(SQL)
%>
Submitted by: Administrator
'Open a Connection with database
Dim DSN
DSN="Provider=SQLOLEDB.1; Persist security info=false; user id=sa; password=main; initial catalog=database name Data Source=localhost"
set objCon=Server.CreateObject("ADODB.Connection")
objCon.Open DSN
%>
<%
'Get the Query
Dim SQL
SQL="insert into tablename values('a','b','c')"
%>
<%
'Insert Into Database
objCon.Execute(SQL)
%>
Submitted by: Administrator
Read Online ASP Programming Job Interview Questions And Answers
Top ASP Programming Questions
☺ | What is application Object in ASP? |
☺ | Should user input data validation occur server-side or client-side? Why? |
☺ | Where is the value-type variables allocated in the computer RAM? |
☺ | What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? |
☺ | What is the command to display characters to the HTML page? |
Top Dot Net Technologies Categories
☺ | MSF Interview Questions. |
☺ | .Net Architecture Interview Questions. |
☺ | ASP.Net MVC Interview Questions. |
☺ | Entity Framework Interview Questions. |
☺ | C# (Sharp) Programming Language Interview Questions. |