Click here to Skip to main content
15,916,280 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: xml "settings" type files Pin
Bosko197813-May-07 3:07
Bosko197813-May-07 3:07 
GeneralRe: xml "settings" type files Pin
Dave Kreskowiak14-May-07 3:51
mveDave Kreskowiak14-May-07 3:51 
Questioncombox Pin
thanhphuong170312-May-07 7:14
thanhphuong170312-May-07 7:14 
AnswerRe: combox Pin
Paul Conrad12-May-07 14:28
professionalPaul Conrad12-May-07 14:28 
GeneralRe: combox Pin
Arun.Immanuel12-May-07 16:34
Arun.Immanuel12-May-07 16:34 
JokeRe: combox Pin
Paul Conrad12-May-07 16:41
professionalPaul Conrad12-May-07 16:41 
Questioncombox Pin
thanhphuong170312-May-07 7:11
thanhphuong170312-May-07 7:11 
AnswerRe: combox Pin
Paul Conrad12-May-07 14:29
professionalPaul Conrad12-May-07 14:29 
AnswerRe: combox Pin
Christian Graus13-May-07 1:28
protectorChristian Graus13-May-07 1:28 
Questioncontrols are like vb6 while im using vs.net Pin
Hasan Jaffal12-May-07 4:43
Hasan Jaffal12-May-07 4:43 
AnswerRe: controls are like vb6 while im using vs.net Pin
Dave Kreskowiak14-May-07 3:44
mveDave Kreskowiak14-May-07 3:44 
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 

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.