September 10, 2020 at 6:52 pm
The query definition has about 75 lines. It is part of an Excel VBA routine in which I connect to a MS SQL database using ADO. One reason to go with an external file is to avoid adding the line break characters such as " & _ at the end of every line.
I am able to retrieve my file with VBA and pass it to string variable, no problem. When I paste it in Microsoft SQL Studio, it will trigger errors. My query definition becomes 4 very long lines of 2000 characters and it will truncate anywhere like a middle of a word.
Also just a note to mention that when I retrieve the file, by code I replace a variable with an actual part number. For example, 'SC1' can become '0270'
Obviously I am doing it wrong. Can somebody guide me in the right direction or offer an example. TIA.
September 11, 2020 at 2:00 am
Ok, I guess that I just had to learn about stored procedures and how to start them with VBA. Done.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy