RAYLWARD102
Well-known Member
- Joined
- May 27, 2010
- Messages
- 529
I'm very familiar with fetching a query based record set, via Excel VBA adodb connection to an access or SQL table.
Recently, I discovered a whole other level of SQL syntax, allowing one to declare variables and do interesting things.
I wanted to know how I can execute statements that include SQL declares into my record set and can't seem to figure it out. My statements definitely work, since I tehy execute flawlessly in my SQL Visual studio debugger;
The vba screenshot, works if I do a simple query like "SELECT * FROM hrdat.dbo.absence" with no issues, so the connection is open and ready; but seems the query needs to be delivered differently possibly when using declare and other sql syntax; any ideas would be appreciated.
Recently, I discovered a whole other level of SQL syntax, allowing one to declare variables and do interesting things.
I wanted to know how I can execute statements that include SQL declares into my record set and can't seem to figure it out. My statements definitely work, since I tehy execute flawlessly in my SQL Visual studio debugger;
The vba screenshot, works if I do a simple query like "SELECT * FROM hrdat.dbo.absence" with no issues, so the connection is open and ready; but seems the query needs to be delivered differently possibly when using declare and other sql syntax; any ideas would be appreciated.