I have a table in Oracle (MyTable) where – among other fields – I have:[pre]
NEEDS_ID NUMBER(2),
OBJ_ID NUMBER(2),
OBJ_COMMENTS VARCHAR2(250 BYTE),
TIME21_ID NUMBER(2)[/pre]
I do have a (ADODB) connection to my data base (Cn), and so far I’ve been using something like:
[pre]
strSQL = "Update MyTable Set " _
& " NEEDS_ID = " & cboNeeds.Text & ", " _
& " OBJ_ID = " & cboObj.Text & ", " _
& " OBJ_COMMENTS = ‘" & txtComments.Text & "’, " _
& " TIME21_ID = " & cboTime.Text & _
& " WHERE SomeID = " & intSomeID
Cn.Execute strSQL
[/pre]
It’s about time I would use parameterized query instead to Update those fields to avoid an SQL injection.
I did my search on the Web, but there are many confusing examples out there.
Any (simple) help would be much appreciated.
Have fun.
---- Andy
A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
NEEDS_ID NUMBER(2),
OBJ_ID NUMBER(2),
OBJ_COMMENTS VARCHAR2(250 BYTE),
TIME21_ID NUMBER(2)[/pre]
I do have a (ADODB) connection to my data base (Cn), and so far I’ve been using something like:
[pre]
strSQL = "Update MyTable Set " _
& " NEEDS_ID = " & cboNeeds.Text & ", " _
& " OBJ_ID = " & cboObj.Text & ", " _
& " OBJ_COMMENTS = ‘" & txtComments.Text & "’, " _
& " TIME21_ID = " & cboTime.Text & _
& " WHERE SomeID = " & intSomeID
Cn.Execute strSQL
[/pre]
It’s about time I would use parameterized query instead to Update those fields to avoid an SQL injection.
I did my search on the Web, but there are many confusing examples out there.
Any (simple) help would be much appreciated.
Have fun.
---- Andy
A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.