'Declaration Public Shadows Function CreateParameter() As SalesforceParameter
public new SalesforceParameter CreateParameter()
Return Value
A SalesforceParameter object.
'Declaration Public Shadows Function CreateParameter() As SalesforceParameter
public new SalesforceParameter CreateParameter()
public void CreateParam(SalesforceConnection salesforceConnection) { SalesforceCommand salesforceCommand = new SalesforceCommand("SELECT * FROM Account WHERE Name=:Name",salesforceConnection); SalesforceParameter myParam = salesforceCommand.CreateParameter(); myParam.SalesforceDbType = Devart.Data.Salesforce.SalesforceType.String; myParam.Value = "GenePoint"; myParam.ParameterName = "Name"; salesforceCommand.Parameters.Add(myParam); salesforceConnection.Open(); SalesforceDataReader salesforceReader = null; try { salesforceReader = salesforceCommand.ExecuteReader(); while (salesforceReader.Read()) { Console.WriteLine(salesforceReader.GetString(0) + ", " + salesforceReader.GetString(1) + ", " + salesforceReader.GetString(2)); } } finally { salesforceReader.Close(); salesforceConnection.Close(); } }
Public Sub CreateParam(salesforceConnection As SalesforceConnection) Dim salesforceCommand As New SalesforceCommand("SELECT * FROM Account WHERE Name=:Name", salesforceConnection) Dim myParam As SalesforceParameter = salesforceCommand.CreateParameter() myParam.SalesforceDbType = Devart.Data.Salesforce.SalesforceType.[String] myParam.Value = "GenePoint" myParam.ParameterName = "Name" salesforceCommand.Parameters.Add(myParam) salesforceConnection.Open() Dim salesforceReader As SalesforceDataReader = Nothing Try salesforceReader = salesforceCommand.ExecuteReader() While salesforceReader.Read() Console.WriteLine(salesforceReader.GetString(0) & ", " & salesforceReader.GetString(1) & ", " & salesforceReader.GetString(2)) End While Finally salesforceReader.Close() salesforceConnection.Close() End Try End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2