Click here to Skip to main content
16,012,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: using variables in insert query for Access Pin
Cedric Moonen15-Jun-06 23:14
Cedric Moonen15-Jun-06 23:14 
GeneralRe: using variables in insert query for Access Pin
shuchigo_jane15-Jun-06 23:17
shuchigo_jane15-Jun-06 23:17 
GeneralRe: using variables in insert query for Access Pin
Cedric Moonen15-Jun-06 23:19
Cedric Moonen15-Jun-06 23:19 
GeneralRe: using variables in insert query for Access Pin
David Crow16-Jun-06 3:03
David Crow16-Jun-06 3:03 
AnswerRe: using variables in insert query for Access Pin
Viorel.15-Jun-06 22:58
Viorel.15-Jun-06 22:58 
AnswerRe: using variables in insert query for Access Pin
Milton Karimbekallil15-Jun-06 23:56
Milton Karimbekallil15-Jun-06 23:56 
GeneralRe: using variables in insert query for Access Pin
shuchigo_jane16-Jun-06 0:02
shuchigo_jane16-Jun-06 0:02 
GeneralRe: using variables in insert query for Access Pin
Viorel.16-Jun-06 1:38
Viorel.16-Jun-06 1:38 
Please note that the solution based on string concatenation sometime will give SQL errors, in another cases will allow someone to manipulate your database in un-authorized manner.

For instance, suppose the url variable is a string that is entered by the user. If he/shi enters "http://www.codeproject.com" everything is fine, but if enter "http://www.codeproject.com?user=’abc’", then your insert operation will fail. (Guess why).

If the user enters something like "’,1,2,3,’bad string’) --", then instead of your 7, 6, 8 and 'hi' values, database will be filled with 1, 2, 3 and ’bad string’ values.

This technique is called SQL injection. It can allow bad people to discover private information like passwords, or even delete the entire database.

You can read about this here:
QuestionFileHeader Pin
Rinu_Raj15-Jun-06 20:56
Rinu_Raj15-Jun-06 20:56 
QuestionRe: FileHeader Pin
Hamid_RT15-Jun-06 21:29
Hamid_RT15-Jun-06 21:29 
AnswerRe: FileHeader Pin
Sarath C15-Jun-06 21:35
Sarath C15-Jun-06 21:35 
AnswerRe: FileHeader Pin
kakan15-Jun-06 21:42
professionalkakan15-Jun-06 21:42 
QuestionCould someone help me with this? Pin
Syouki_kou15-Jun-06 20:54
Syouki_kou15-Jun-06 20:54 
AnswerRe: Could someone help me with this? Pin
kakan15-Jun-06 21:28
professionalkakan15-Jun-06 21:28 
GeneralRe: Could someone help me with this? Pin
Syouki_kou18-Jun-06 15:33
Syouki_kou18-Jun-06 15:33 
QuestionCDialog Pin
Member 303984315-Jun-06 20:08
Member 303984315-Jun-06 20:08 
AnswerRe: CDialog Pin
Hamid_RT15-Jun-06 20:12
Hamid_RT15-Jun-06 20:12 
GeneralRe: CDialog Pin
Member 303984315-Jun-06 20:18
Member 303984315-Jun-06 20:18 
GeneralRe: CDialog Pin
Hamid_RT15-Jun-06 20:24
Hamid_RT15-Jun-06 20:24 
GeneralRe: CDialog Pin
Member 303984315-Jun-06 20:47
Member 303984315-Jun-06 20:47 
GeneralRe: CDialog Pin
Hamid_RT15-Jun-06 21:02
Hamid_RT15-Jun-06 21:02 
GeneralRe: CDialog Pin
Eytukan15-Jun-06 23:09
Eytukan15-Jun-06 23:09 
GeneralRe: CDialog Pin
Hamid_RT16-Jun-06 0:50
Hamid_RT16-Jun-06 0:50 
GeneralRe: CDialog Pin
Member 303984317-Jun-06 2:00
Member 303984317-Jun-06 2:00 
GeneralRe: CDialog Pin
Hamid_RT17-Jun-06 7:11
Hamid_RT17-Jun-06 7:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.