Click here to Skip to main content
15,887,083 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: controls are like vb6 while im using vs.net Pin
Hasan Jaffal14-May-07 23:12
Hasan Jaffal14-May-07 23:12 
GeneralRe: controls are like vb6 while im using vs.net Pin
Dave Kreskowiak15-May-07 12:49
mveDave Kreskowiak15-May-07 12:49 
Questioncan not create activex component Pin
vmsrdy12-May-07 1:22
vmsrdy12-May-07 1:22 
AnswerRe: can not create activex component Pin
Dave Kreskowiak14-May-07 3:41
mveDave Kreskowiak14-May-07 3:41 
QuestionCreating user controls Pin
steve_rm12-May-07 0:49
steve_rm12-May-07 0:49 
AnswerRe: Creating user controls Pin
Christian Graus12-May-07 0:57
protectorChristian Graus12-May-07 0:57 
QuestionRadio Button insert option Pin
rrrriiizz12-May-07 0:43
rrrriiizz12-May-07 0:43 
AnswerRe: Radio Button insert option Pin
Christian Graus12-May-07 0:53
protectorChristian Graus12-May-07 0:53 
rrrriiizz wrote:
str = "Insert into EmployeeMaster values('" & txtname.Text & "','" & txtfname.Text & "','" & dtdob.Text & "','" & gencom.Text & "','" & txtqual.Text & " ','" & txtbg.Text & " ','" & martcom.Text & "','" & txtadd.Text & "',' " & txtcadd.Text & " ','" & txtpho.Text & "','" & txtmob.Text & "',' " & txtemail.Text & " ','" & txtpp.Text & " ','" & txtpv.Text & " ',' " & txteno.Text & " ',' " & depcom.Text & " ', ' " & descom.Text & " ',' " & dtdoj.Text & " ','" & catcom.Text & "','" & mopcom.Text & "','" & txtac.Text & "','" & byes.Text & "',' " & txtbv.Text & "',' " & txtcdue.Text & "','" & txtcdate.Text & "','" & txtesino.Text & "','" & txtpfno.Text & "','" & expyes.Text & "',' " & detcom.Text & "','" & txtpc.Text & "','" & txtnc.Text & "' )"


This is begging for a SQL attack, you should use parameterised queries, or, better yet, stored procs.

Colin has an excellent article on SQL injection, you should read it.

In C#, you can do this:

string sex = (rdoMale.Checked) ? "Male" : "Female";

Does VB do something like that ? Basically, it depends on how your data is stored, if it's a bool use the check result of the appropriate button. Otherwise, you need to build your paramater based on radio button state.


Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

QuestionDataGridView Virtual Mode Sort Pin
_mubashir12-May-07 0:40
_mubashir12-May-07 0:40 
AnswerRe: DataGridView Virtual Mode Sort Pin
Dave Kreskowiak14-May-07 3:40
mveDave Kreskowiak14-May-07 3:40 
QuestionSQL statement problem [modified] Pin
Toubou11-May-07 23:34
Toubou11-May-07 23:34 
AnswerRe: SQL statement problem Pin
CPallini12-May-07 5:03
mveCPallini12-May-07 5:03 
Questionhelloooooooooooooooooo its urgent Pin
imanos11-May-07 22:50
imanos11-May-07 22:50 
AnswerRe: helloooooooooooooooooo its urgent Pin
theScorp11-May-07 23:10
theScorp11-May-07 23:10 
GeneralRe: helloooooooooooooooooo its urgent Pin
imanos13-May-07 22:39
imanos13-May-07 22:39 
AnswerRe: helloooooooooooooooooo its urgent Pin
Christian Graus12-May-07 0:13
protectorChristian Graus12-May-07 0:13 
JokeRe: helloooooooooooooooooo its urgent Pin
Paul Conrad12-May-07 14:31
professionalPaul Conrad12-May-07 14:31 
GeneralRe: helloooooooooooooooooo its urgent Pin
imanos13-May-07 22:50
imanos13-May-07 22:50 
GeneralRe: helloooooooooooooooooo its urgent Pin
Paul Conrad14-May-07 5:24
professionalPaul Conrad14-May-07 5:24 
Questionwhat is vb.net code for search the value in datagrid by select the value in combo box in vb.net windows application Pin
sathyan_829411-May-07 21:47
sathyan_829411-May-07 21:47 
AnswerRe: what is vb.net code for search the value in datagrid by select the value in combo box in vb.net windows application Pin
Christian Graus12-May-07 0:16
protectorChristian Graus12-May-07 0:16 
Questionwhat is vb.net code for delete a record in datagrid using vb.net windows application Pin
sathyan_829411-May-07 21:30
sathyan_829411-May-07 21:30 
AnswerRe: what is vb.net code for delete a record in datagrid using vb.net windows application Pin
harsh_c13-May-07 22:11
professionalharsh_c13-May-07 22:11 
Questionwhat is vb.net code for changing the values in datagrid and save the changed values in datagrid in vb.net windows application Pin
sathyan_829411-May-07 21:25
sathyan_829411-May-07 21:25 
QuestionVB in Excel Pin
sujithkumarsl11-May-07 20:23
sujithkumarsl11-May-07 20:23 

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.