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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Robinstwitcher

    [b]Saving multiple worksheets as delimited files[b/]

    Mike, The worksheet names are currently, sheet1, sheet2 etc to a drive with appropriate permissions. (Proved that with the original bit of code) Bob, I can see where you are coming from - but doesn't it save the whole document as a .txt file rather than a worksheet - therefore deleting...
  2. Robinstwitcher

    [b]Saving multiple worksheets as delimited files[b/]

    Mike, it falls over on the first sheet - I have checked the variables and they seem to be populated as I would expect
  3. Robinstwitcher

    [b]Saving multiple worksheets as delimited files[b/]

    Mike, returns: Run-time error '1004': Method 'SaveAs' of object '_Worksheet' failed Any ideas?
  4. Robinstwitcher

    [b]Saving multiple worksheets as delimited files[b/]

    Am trying to save multiple worksheets within a workbook as a tab delimited file. However with the following code it saves multiple files with the correct sheet name, but only the data from Sheet1 (i.e. doesn't save the data from all the seperate worksheets) Private Sub CommandButton2_Click()...
  5. Robinstwitcher

    Replacing White Space in String

    Apologies for my absolute stupidity - had used a cursor with the replace. However, forgot to write the cursor back to the table - hence no update. Thanks for your prompt response.
  6. Robinstwitcher

    Replacing White Space in String

    Am trying to clean up data. I am using LTRIM, RTRIM but also need to remove unnecessary spaces within the string. e.g. This is my string should be This is my string Any solutions?
  7. Robinstwitcher

    Error Trapping within Store Procs

    Thanks for help, after reading the link changed code to: CREATE PROCEDURE Control AS DECLARE @retStatus int SET NOCOUNT ON EXEC @retstatus = [Upload] SELECT @retStatus = coalesce(NULLIF(@retStatus, 0), @@error) IF @retstatus <> 0 begin GOTO ErrorMsg RETURN @retStatus END EXEC @retstatus =...
  8. Robinstwitcher

    Error Trapping within Store Procs

    Paul, Afraid not, still in the 2000 era!
  9. Robinstwitcher

    Error Trapping within Store Procs

    I have added End after the GOTO ErrorMsg lines. However, if i change Tbl1, Col2 from a numeric to SmallDateTime and leave Tbl2, Col2 as an int. I get: Server: Msg 260, Level 16, State 1, Procedure Upload, Line 7 Disallowed implicit conversion from data type smalldatetime to data tye bit...
  10. Robinstwitcher

    Error Trapping within Store Procs

    bborissov, thanks for that, have copied your code - I get an "Incorrect syntax near 'success:'" I am not sure if there is anymore code after it? or whether I need to add some "end" points?
  11. Robinstwitcher

    Error Trapping within Store Procs

    I have a multiple store procs that are called from a 'controlling' store proc. This is working fine, however I am trying to introduce Error trapping. This is all fairly new to me and I need some advice as to what I should be looking for. So far I have been using: CREATE PROCEDURE Control AS...
  12. Robinstwitcher

    CASE Statement with variables

    I have the following code which returns "Incorrect syntax near the keyword 'THEN'." Please advise me on my errors! declare @ImportTblAP nvarchar (2), @ImportTblFY nvarchar (2), @FYSTRING nvarchar (10), @ModAPFY nvarchar (12) select @ImportTblFY = rtrim(max(FY)),@ImportTblAP = rtrim(Max(AP))...
  13. Robinstwitcher

    Passing Information between Store Procs

    Alex, The Master store proc looks like the following. I don't believe I have configured them to accept a parameter? CREATE PROCEDURE [dbo].[usp_ControlPanel] AS exec usp_InsertData exec usp_UpdateData exec usp_TransferData GO the code within usp_InsertData is CREATE PROCEDURE...
  14. Robinstwitcher

    Passing Information between Store Procs

    Alex, yes it does make sense. However my abilities as yet have not stretched to passing parameters between Store Procs!! can you help?
  15. Robinstwitcher

    Passing Information between Store Procs

    I currently have one overall store proc that calls the others - am open to suggestions if this is not the right solution!?
  16. Robinstwitcher

    Passing Information between Store Procs

    I have a number of store procedures that run in sequence as part of data load process each month. Each one requires a common value to extracted from a table based on a criteria (e.g. Current Month). Can I create a variable in the first store proc and pass it to the remaining or do I have to...
  17. Robinstwitcher

    Returning Windows Login Name

    Is there a way of picking up the details of a user i.e. their windows login name (which can be done through Excel etc)
  18. Robinstwitcher

    Register Server

    I have been following the steps through as described. And still got the same error message as micanguk. However this morning after rebooting the server and then starting up the client I have connected successfully. Thanks. I created a SQL login on the server and then used that to connect...

Part and Inventory Search

Back
Top