1

I need to pass generated sql string and query database and need to get data out of it.

      dim sql,spack
  spack="test"
  sql="select * from dbo.packageName A where a.custname=" & spack 

  set rs = getRs(sql)

This code statement return error. Could you please someone explain me how to pass parameter like above code segment(parameter spack).

1 Answer 1

3

The Varial should be inclosed in single quotes

 sql="select * from dbo.packageName A where a.custname='" & spack & "'"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.