I looked into this and it seems like this is the way to protect myself
however, now I'm having trouble with my connection. Before, the variable "sqlStatement" was just a string and I was using:
MyDataAdapter = New Odbc.OdbcDataAdapter(sqlStatement, MyConnection)
However, now it's a command, so how do I get this to execute properly? I've tried adding sqlStatement.toString, but that doesn't help.
_______________
_brian.
Code:
Dim sqlStatement As New Odbc.OdbcCommand("SELECT * FROM content LEFT JOIN categories ON content.category = categories.categoryid WHERE categories.cat_name = @category AND content.name = @page AND content.deleted <> '1' LIMIT 0,1")
sqlStatement.Parameters.Add("category", Odbc.OdbcType.VarChar).Value = categoryStr
sqlStatement.Parameters.Add("page", Odbc.OdbcType.VarChar).Value = pageStr
MyDataAdapter = New Odbc.OdbcDataAdapter(sqlStatement, MyConnection)
However, now it's a command, so how do I get this to execute properly? I've tried adding sqlStatement.toString, but that doesn't help.
_______________
_brian.