About 17,400 results
Open links in new tab
  1. sql - correct way to pass as string to CreateParameter - Stack Overflow

    ALTER PROCEDURE [dbo].[GetValueProc] @startDate as date, @endDate as date, @proposalNo nvarchar(30) = null, @groupNo nvarchar(3) = null AS BEGIN SELECT @startDate, @endDate, @proposalNo, @groupNo; END; Second, try this VBA (need to edit it for your connection string) which corrects your typos:

  2. ADO CreateParameter Method - W3Schools

    The CreateParameter method creates and returns a Parameter object containing the specified properties like name, type, direction, size, and value. Note: This method does not automatically add the new Parameter to the collection.

  3. VBA How do you pass DATE as parameter to stored procedure

    Dec 5, 2013 · .Parameters.Append .CreateParameter("@date", adDate, adParamInput, , ) @ is optional msdn ( command.CreateParameter (Name, Type, Direction, Size, Value) ) and type of parameter adDBTimeStamp

  4. CreateParameter method (ADO) | Microsoft Learn

    Sep 14, 2021 · Use the CreateParameter method to create a new Parameter object with a specified name, type, direction, size, and value. Any values you pass in the arguments are written to the corresponding Parameter properties.

  5. Select data from a table in VBA using multiple variables in the …

    Oct 6, 2024 · To execute the SQL query using ADO with parameters instead of concatenating strings, you'll want to use the `Command` object along with `CreateParameter`. This approach helps prevent SQL injection attacks and improves code readability.

  6. Passing a Date parameter to a Parametrized query - PC Review

    Oct 14, 2005 · I have the following query: PARAMETERS [dDate] DateTime; UPDATE DepositTemp SET DepositTemp.DepositDate = [dDate]; And here is my code...

  7. Example of SQL INSERT / UPDATE using ADODB ... - Access World Forums

    Jun 23, 2011 · There are very few examples to be found on the Internet of using an ADODB.Command with ADODB.Parameters objects to issue a SQL INSERT statement to an Access table. Here is a working example! Dim adoCMD As Object. Dim adoRS As Object. Dim strSQL As String. 'Define a query to INSERT a new record into the FE temp table.

  8. Configuring parameters and parameter data types - ADO.NET

    Sep 15, 2021 · Command objects use parameters to pass values to SQL statements or stored procedures, providing type checking and validation. Unlike command text, parameter input is treated as a literal value, not as executable code.

  9. VBA Tutorial => Creating parameterized commands

    Dim fooValue As ADODB.Parameter. Set fooValue = .CreateParameter("FooValue", adNumeric, adParamInput) fooValue.Value = 42. Dim condition As ADODB.Parameter. Set condition = .CreateParameter("Condition", adBSTR, adParamInput) condition.Value = "Bar" 'Add the parameters to the Command. .Parameters.Append fooValue. .Parameters.Append condition.

  10. Dynamically Parameterized Queries for Classic ASP

    Dec 12, 2010 · It is pretty easy to use parameterized queries in code to do this, but why bother writing and re-writing basically the same code every time you need to use it. So, I came up with a method that will do everything you will need it to do for dynamically parameterized queries when developing a classic ASP web application.

  11. Some results have been removed
Refresh