|
|
|
เขียน .NET Query ผ่าน Parameter .NET Parameterized Queries |
|
|
|
|
|
|
|
Code (VB.NET)
strSQL = "INSERT INTO customer (CustomerID,Name,Email,CountryCode,Budget,Used) " & _
"VALUES (@sCustomerID,@sName,@sEmail,@sCountryCode,@sBudget,@sUsed)"
objCmd = New System.Data.OleDb.OleDbCommand(strSQL,objConn)
With objCmd
.Parameters.Add(New OleDbParameter("@sCustomerID","C005"))
.Parameters.Add(New OleDbParameter("@sName","Weerachai Nukitram"))
.Parameters.Add(New OleDbParameter("@sEmail","[email protected]"))
.Parameters.Add(New OleDbParameter("@sCountryCode","TH"))
.Parameters.Add(New OleDbParameter("@sBudget","2000000"))
.Parameters.Add(New OleDbParameter("@sUsed","1000000"))
End With
Go to : .NET Parameterized Queries
|
|
|
|
|
Date :
2011-05-28 09:45:44 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|