<%@ import namespace="system.data.sqlclient" %> |
<Script runat="server"> |
Sub page_load |
Dim dbconn as sqlconnection |
Dim dbCMD as sqlCommand |
dbConn = New SQLConnection ("Data Source=DBSERVERNAME;Initial Catalog=YOURDBNAME;User ID=YOURUSERID;Password=YOURPASSWORD") |
dbConn.open() |
dbCMD = new sqlcommand ("insert into tblTest values ('test')",dbconn) |
dbCMD.executenonquery() |
dbConn.close() |
End Sub |
</Script> |
Record Inserted |
Article ID: 168, Created: July 25, 2012 at 12:39 AM, Modified: July 25, 2012 at 12:39 AM