Hi All! I want execute parametrized sql text query in Nav2009

I use microsoft ado library 2.8. Question in how can i pass the parameter to the sql text query?
SELECT [Project No_] FROM WHERE [CM FIO] = @UserVariable

IF I compile
SELECT [Project No_] FROM WHERE [CM FIO] = 'Kanye West'
it works, but i want make this with parameter @UserVariable.


My function where i am trying to pass the parameter to the commandtext:

>>
SQLParameter - 'Microsoft ActiveX Data Objects 2.8 Library'.Parameter
SQLCommand - 'Microsoft ActiveX Data Objects 6.1 Library'.Command


IF ISCLEAR(SQLParameter) THEN
CREATE(SQLParameter);


SQLParameter := SQLCommand.CreateParameter('@UserVariable',200,1,60,'Some Value');
SQLCommand.Parameters.Append(SQLParameter);
<<


Sign In or Register to comment.