Advertisement
Advertisement
| 05.08.2008 at 05:40PM PDT, ID: 23388137 | Points: 125 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: |
<%@ Page Language="vb" Debug="true" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
'declarations
Dim connection As SqlConnection
connection = New SqlConnection( _
"server=127.0.0.1;uid=UT;pwd=pass; " & _
"database=Maintenance")
connection.Open
Dim command As New SqlCommand("INSERT INTO Requests", connection)
command.Connection.Open()
command.ExecuteNonQuery()
'cmdLath = New SqlCommand ( _
' "select idno,yr,txt from latham", _
' conLath)
'rdrLath = cmdLath.ExecuteReader
'gridLath.DataSource = rdrLath
'gridLath.DataBind
'rdrLath.Close
'cmdLath.Dispose
connection.Close
End Sub
</script>
continue with the html part of page
|
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 05.08.2008 at 05:45PM PDT, ID: 21529661 |
| 05.08.2008 at 05:45PM PDT, ID: 21529665 |
| 05.08.2008 at 05:47PM PDT, ID: 21529670 |
| 05.08.2008 at 05:48PM PDT, ID: 21529673 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: |
SELECT Syntax - Get Information from a table in database
SELECT ColumnName1,ColumnName2, ColumnName3 FROM TableName
SELECT DISTINCT ColumnName FROM TableName
SELECT COUNT (ColumnName) FROM TableName
SELECT ColumnName FROM TableName WHERE ColumnName = value
SELECT ColumnName FROM TableName WHERE ColumnName1 = value AND ColumnName2 = value
SELECT ColumnName FROM TableName WHERE ColumnName1 = value OR ColumnName2 = value
SELECT ColumnName FROM TableName WHERE ColumnName IN (Value1,Value2)
SELECT ColumnName FROM TableName WHERE ColumnName BETWEEN (Value1 AND Value2)
SELECT ColumnName FROM TableName WHERE ColumnName Like '%Value1%'
SELECT ColumnName FROM TableName ORDER BY ColumnName
SELECT ColumnName1 , SUM(ColumnName2 ) FROM TableName GROUP BY ColumnName1 HAVING (Arithematic Condition)
UPDATE Syntax
UPDATE TableName SET ColumnName = Value WHERE {Condition}
UPDATE TableName SET ColumnName = Value WHERE ColumnName = value
DELETE Syntax
DELETE TableName WHERE {Condition}
DELETE TableName WHERE ColumnName = value
|
| 05.08.2008 at 05:49PM PDT, ID: 21529682 |
| 05.08.2008 at 05:50PM PDT, ID: 21529683 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: |
The INSERT statement allows you to insert a single record or multiple records into a table. The syntax for the INSERT statement is: INSERT INTO table (column-1, column-2, ... column-n) VALUES (value-1, value-2, ... value-n); Example #1 - Simple example Let's take a look at a very simple example. INSERT INTO suppliers (supplier_id, supplier_name) VALUES (24553, 'IBM'); This would result in one record being inserted into the suppliers table. This new record would have a supplier_id of 24553 and a supplier_name of IBM. Example #2 - More complex example You can also perform more complicated inserts using sub-selects. For example: INSERT INTO suppliers (supplier_id, supplier_name) SELECT account_no, name FROM customers WHERE city = 'Newark'; By placing a "select" in the insert statement, you can perform multiples inserts quickly. With this type of insert, you may wish to check for the number of rows being inserted. You can determine the number of rows that will be inserted by running the following SQL statement before performing the insert. SELECT count(*) FROM customers WHERE city = 'Newark'; |
| 05.08.2008 at 05:51PM PDT, ID: 21529688 |
| 05.08.2008 at 05:52PM PDT, ID: 21529691 |
| 05.08.2008 at 05:57PM PDT, ID: 21529705 |
| 05.08.2008 at 05:59PM PDT, ID: 21529710 |
| 05.08.2008 at 06:01PM PDT, ID: 21529718 |
| 05.08.2008 at 06:01PM PDT, ID: 21529720 |
| 05.08.2008 at 06:03PM PDT, ID: 21529728 |
1: 2: 3: 4: 5: 6: 7: |
<configuration> <connectionStrings> <add name="MidwareConnectionString" connectionString="Data Source=myServer;Initial Catalog=myTable;User ID=user;Password=password" providerName="System.Data.SqlClient"/> </connectionStrings> <system.web> and so on...... |
| 05.08.2008 at 06:04PM PDT, ID: 21529732 |
| 05.08.2008 at 06:05PM PDT, ID: 21529736 |
| 05.08.2008 at 06:11PM PDT, ID: 21529764 |
| 05.08.2008 at 06:12PM PDT, ID: 21529765 |