Execute Non Query


#1

I’m attempting to perform a SQL INSERT and I need to pass in variables previously declared and set. I’ve tried standard vb.net functionality but that doesn’t seem to work. Does anyone have an example of completing this task?

Thank you,

Thom

ANSWER: In order to use variable(s) that have been set previously you must click on Parameters within the ‘Edit Sql’ window. In the Name field create a new variable, In as the direction, data type that matches and reference the previous variable(s) name in the Value field.


#2

For clarity I’m trying to understand how much latitude I have using the EDIT SQL window when attempting to perform the INSERT. Can I decare\set variables etc. using vb.net? I have tried several options but continue to get syntax related issues. If anyone has a brief example that would be much appreciated.