Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by git2dn

  1. git2dn

    passing 2 parameters to a stored procedure

    Do you think my problem is that in the Stored Procedure I use the REPLACE function for both of the parameters I pass to the Stored Procedure ? CREATE PROCEDURE dbo.procUDFl @prmSQL varchar (8000), @RptYearF int, @RptYearS int AS SET @prmSQL = REPLACE(@prmSQL,'intYearSP',CAST(@RptYearF AS...
  2. git2dn

    passing 2 parameters to a stored procedure

    I tried your suggestion as follows but I still get the error as follows: ?err.Number -2147217900 error line: Set rstQueryFS = .Execute ---------------------------------------------- With com .CommandType = adCmdStoredProc .CommandText = "dbo.procUDFl" Set prmSQL =...
  3. git2dn

    passing 2 parameters to a stored procedure

    The following Access Application works fine when I pass 1 parameter at a time to the stored proc. When I pass 2 parms at the same time the parameters get loaded as per the following Immediate Window values: ?RptYearF 2005 ?RptYearS 2004 For the snapshots of my code, you will see that I...
  4. git2dn

    How to use the REPLACE FUNCTION

    I created a dynamic SQL string named strSQLFS in my Access applcation and the last part of this string is a WHERE clause as follows: strSQLFS = " (C.DateL <= @DateFI AND P.Prop='FI' AND P.Ira Is Null AND S.Cycle='1') " In my Access application I call a parameterized stored procedure in the...
  5. git2dn

    Error 3708 on Stored Procedure with a parameter

    cmmrfrds, your observation was exactly what I needed thanks a million.
  6. git2dn

    Error 3708 on Stored Procedure with a parameter

    I created a dynamic query in my Access application as a SQL string. The user selects values from various controls on the screen including list boxes and based on the values selected from the varous controls, I built a SQL string. Now I want to pass along the SQL string named strSQL to a Stored...
  7. git2dn

    Modify Exel output via VBA

    Can a macro like the following be modified and converted into a function and used with the functions noted in my question above so that some cells in my spreadsheet will automatically be repositioned without the user having to run a macro ? Sub MoveCells() Dim x As Variant Dim i As Long...
  8. git2dn

    Modify Exel output via VBA

    I created an Excel file based on 3 queries and a report. However, the alignment of the fields in the Excel file is not correct. Fields shifted over 1 cell position when the report was migrated to an Excel spreadsheet. Based on the following procedures, is there a way to change the cells in the...
  9. git2dn

    Dynamic SQL Statement or MS SQL Stored Procedure

    Can the following Dynamic SQL statement be converted to a MS SQL Stored Procedure and if so, how ? I realize that CDate is not a valid function in MS SQL Server Stored Procedures. For an example: Assume that cbYr has a value of 5 (it's an integer value between 1 and 5). Assume...
  10. git2dn

    How to represent Date comparison in SQL Server Stored Procedure

    I am trying to construct a SQL Server Stored Procedure with the following objective in mind: Date Field A <= Date Field B ---------------------------- Date Field B is calculated as follows: lstYear (Year value in the format CCYY selected by the user from a list box) minus tblA.intNumYr (an...
  11. git2dn

    How to replace Format function when using SQL Server stored procedure

    I am in the process of migrating from Access local tables to using a SQL Server back-end database. I was trying to convert SQL strings within my Access application into stored procedures. How would I convert the following SQL string from my Access application into a stored procedure ? A value...
  12. git2dn

    execute a stored procedure via a SQL Server back end database

    I have developed an application with Access as the front end and the back-end is a SQL server database. I am trying to execute stored procedures using ADO. I have coded the following but I get an error on the cnn.Open command that follows: The error is [DBNETLIB][Connection...

Part and Inventory Search

Back
Top