SQLlite database Selecting from two fields

Hi Guys,
Sorry for this question that I know is simple but me learning can’t figure it out:

I want to select a record from a SQLlite database based on two fields so I can delete it:

  1. ProdNombre (string)
  2. FacturaID (Integer)

I’m using this statement and the compiler says “Expected string but got integer”

vCurrentRowSet = app.db.SelectSQL("SELECT * FROM Factura_Detalles WHERE ProdNombre = " + vCurrent + " AND FacturaID = " + vFacturaID + ")

vCurrent is string and vFacturaID is an Integer

Thanks guys

Use a “prepared statement” feature to avoid this and make your code both more readable and more secure.

vCurrentRowSet = app.db.SelectSQL("SELECT * FROM Factura_Detalles WHERE ProdNombre = ? AND FacturaID = ?", vCurrent, vFacturaID)

The strict answer to your question is:

... " + vFacturalID.ToString + ...

Thank you Kem,
That worked and definitely will use the “prepared statement” next time, a lot easier