Contents of bcreate.asp:
<html> <body bgcolor="#cccccc"> <Table border="1"> <tr><td valign='middle' bgcolor='#999999'><img src="captsm.gif"></td> <td valign='middle' bgcolor='#999999'><center><font color="#ffffff"><font face="Comic Sans MS"> <br> <b>A Simple ASP Example<br>Create/Drop</b> <br> </td></tr></table> </center> <p> <font face="Comic Sans MS"><b> <p> <p>Begin execution<p> <% on error resume next set cn=Server.CreateObject("ADODB.Connection") cn.open "gl001","gl001","11111" SQLString1="DROP TABLE badge" SQLString2="CREATE TABLE badge (" SQLString2=SQLString2+"bid int NOT NULL," SQLString2=SQLString2+"bloc char(1)," SQLString2=SQLString2+"blastname varchar(20)," SQLString2=SQLString2+"bfirstname varchar(20)," SQLString2=SQLString2+"primary key (bid))" ' '*** Comment out the following four lines ' once the table is created remove the comments ' response.write "<p>Ready to DROP badge" response.write "<p>SQLString --->"+cstr(SQLString1)+"<---" cn.execute SQLString1,numa response.write "<p>DROPPED badge OK numa="+cstr(numa) response.write "<p>Ready to CREATE badge" response.write "<p>SQLString="+cstr(SQLString2) cn.execute SQLString2,numa response.write "<p>CREATED badge OK numa="+cstr(numa) %> <p> <a href="bdoc.asp?fl=c"> Click here</a> for the program listing (bcreate.asp)<p> <a href="bulk.asp">Click here</a> to load some data into the empty table (bulk.asp) <% cn.close set cn=nothing %> </body> </html>
***** end of file *** printed: 52 lines on: 11/23/2009 5:51:02 AM