Passing a variable to a sql query?

  • Thread starter Thread starter SCA Analyst
  • Start date Start date
S

SCA Analyst

How might I pass a variable's value into a sql query?

simple example: Select * from tbl_person
where age >= <variable from form>
 
Dim oconn As New SqlConnection("data source=d5z0071;database=imc;integrated
security=sspi;")

Dim dapubpay As New SqlDataAdapter("select * from pubpay where bipad = " &
chr(39) & mbipadvar & chr(39) & " order by bipad, issuecode, vflag", oconn)

HTH,

Bernie Yaeger
 
Back
Top