Academic Tutorials



English | French | Portugese | Dutch | Italian
Google

Online

À la maison Codes sources E-Livres Téléchargements Nous contacter Au sujet de nous

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
AJAX Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PHP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
.NET (dotnet)
Microsoft.Net
XML Web Services
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills


L'AGITATION accélèrent

Previous Next





En employant la méthode de GetString () nous accélérons notre manuscrit d'asp au lieu d'employer Response.Write multiple.



Nous pouvons augmenter la vitesse de notre manuscrit d'asp en employant la méthode de GetString () au lieu de writting la méthode multiple de Response.Write ().

Ici un exemple de la méthode multiple de Response.Write () a employé cette exposition comment montrer une question de base de données dans une table de HTML :.


<html>
<body>

<h2>Delete Record</h2>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/database/dataone.mdb"

cid=Request.Form("employeeID")

if Request.form("companyname")="" then
set rs=Server.CreateObject("ADODB.Recordset")
rs.open "SELECT * FROM employee WHERE employeeID='" & cid & "'",conn
%>
<form method="post" action="demo_delete.asp">
<table>
<%for each x in rs.Fields%>
<tr>
<td><%=x.name%></td>
<td><input name="<%=x.name%>" value="<%=x.value%>"></td>
<%next%>
</tr>
</table>
<br /><br />
<input type="submit" value="Delete record">
</form>
<%
else
sql="DELETE FROM employee"
sql=sql & " WHERE employeeID='" & cid & "'"
on error resume next
conn.Execute sql
if err<>0 then
response.write("No update permissions!")
else
response.write("Record " & cid & " was deleted!")
end if
end if
conn.close
%>

</body>
</html>


Pour une grande question, nous écrivons la méthode de Response.write () pas de temps, ceci pouvons ralentir la durée de la transformation de manuscrit, puisque beaucoup de commandes de Response.Write doivent être traitées par le serveur.

La solution est de faire créer la corde entière, du <table> à </table>, et l'a puis produit - en utilisant Response.Write juste une fois.


La méthode de GetString ()

La méthode de GetString () laisse montrer la corde avec writting seulement une méthode de Response.Write (). Elle élimine… code de boucle et l'essai conditionnel qui vérifie si le recordset est à l'EOF.


Syntaxe :

str = rs.GetString(format,rows,coldel,rowdel,nullexpr)


To create an HTML table with data from a recordset, we only need to use three of the parameters given bellow.These three parametre are optional.

coldel - the HTML to use as a column-separator

rowdel - the HTML to use as a row-separator

nullexpr - the HTML to use if a column is NULL


<html>
<body>

<%

set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/database/dataone.mdb"
set rs = Server.CreateObject("ADODB.recordset")
rs.Open "SELECT Companyname, Contactname FROM employee", conn
str=rs.GetString(,,"</td><td>","</td></tr><tr><td>","&nbsp;")

%>

<table border="1" width="100%"> <tr>
<td><%Response.Write(str)%></td>
</tr>
</table>

<%

rs.close
conn.close
set rs = Nothing
set conn = Nothing

%>

</body>
</html>


The str variable in above program contains a string of all the columns and rows returned by the SQL SELECT statement.Between each column the HTML </td><td> will appear, and between each row, the HTML </td></tr><tr><td> will appear. This will produce the exact HTML we need with only one Response.Write() method was used.





Previous Next

Keywords:ADO Speed Up, visual basic ado, ado stored procedure, ado ms access, ado asp net, ado insert into, ado sql server, microsoft access ado, ado vb net, ado visual basic 6


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
AJAX Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PHP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
XML Web Services Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz

Privacy Policy
Copyright © 2003-2008 Vyom Technosoft Pvt. Ltd., All Rights Reserved.