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

Visual Basic

 
GeneralBinding datagrid to collection class Pin
jazzyjboombox22-Feb-07 9:50
jazzyjboombox22-Feb-07 9:50 
GeneralBinding datagrid to collection class Pin
jazzyjboombox3-Mar-07 22:28
jazzyjboombox3-Mar-07 22:28 
GeneralRe: Binding datagrid to collection class Pin
Johan Hakkesteegt4-Mar-07 21:12
Johan Hakkesteegt4-Mar-07 21:12 
GeneralRe: Binding datagrid to collection class Pin
jazzyjboombox4-Mar-07 22:03
jazzyjboombox4-Mar-07 22:03 
QuestionGrid Filtering Pin
rrrriiizz14-Feb-07 17:01
rrrriiizz14-Feb-07 17:01 
AnswerRe: Grid Filtering Pin
Marcus J. Smith15-Feb-07 2:00
professionalMarcus J. Smith15-Feb-07 2:00 
GeneralRe: Grid Filtering Pin
rrrriiizz16-Feb-07 17:24
rrrriiizz16-Feb-07 17:24 
GeneralRe: Grid Filtering Pin
Marcus J. Smith18-Feb-07 4:07
professionalMarcus J. Smith18-Feb-07 4:07 
rrrriiizz wrote:
Private Sub btneno_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btneno.Click
con.Open()
str = "select * from empmaster1 where Eno='" & txtsearch.Text & "'"
da = New OdbcDataAdapter(str, con)
da.Fill(Dspay, "empmaster1")
dgv.DataSource = Dspay
con.Close()
End Sub


If you are allowing them to type anything in the textbox then you should change your SQL to be "LIKE %'" & txtsearch.Text & "'%" instead. I would also suggest you not directly use the textbox text but set it to a variable and pre-validate what they typed because this can lead to a SQL Injection Attack by them typing in the correct commands.


Cleako

GeneralRe: Grid Filtering Pin
rrrriiizz18-Feb-07 22:39
rrrriiizz18-Feb-07 22:39 
GeneralRe: Grid Filtering Pin
Marcus J. Smith19-Feb-07 2:44
professionalMarcus J. Smith19-Feb-07 2:44 
QuestionRe: Grid Filtering Pin
rrrriiizz21-Feb-07 21:39
rrrriiizz21-Feb-07 21:39 
AnswerRe: Grid Filtering Pin
Marcus J. Smith23-Feb-07 5:04
professionalMarcus J. Smith23-Feb-07 5:04 
QuestionData table??????? Pin
nawalage14-Feb-07 16:45
nawalage14-Feb-07 16:45 
AnswerRe: Data table??????? Pin
Christian Graus14-Feb-07 16:49
protectorChristian Graus14-Feb-07 16:49 
QuestionHow to read Excel in vb.net Pin
chaiotali14-Feb-07 16:43
chaiotali14-Feb-07 16:43 
AnswerRe: How to read Excel in vb.net Pin
Christian Graus14-Feb-07 16:51
protectorChristian Graus14-Feb-07 16:51 
Questioninserting in a linked list Pin
moize1214-Feb-07 13:34
moize1214-Feb-07 13:34 
AnswerRe: inserting in a linked list Pin
Christian Graus14-Feb-07 16:52
protectorChristian Graus14-Feb-07 16:52 
QuestionRunning regsvr32.exe from CreateProcess Pin
Barry True14-Feb-07 10:36
Barry True14-Feb-07 10:36 
AnswerRe: Running regsvr32.exe from CreateProcess Pin
Dave Kreskowiak15-Feb-07 4:31
mveDave Kreskowiak15-Feb-07 4:31 
GeneralRe: Running regsvr32.exe from CreateProcess Pin
Barry True15-Feb-07 19:02
Barry True15-Feb-07 19:02 
GeneralRe: Running regsvr32.exe from CreateProcess Pin
Dave Kreskowiak16-Feb-07 1:59
mveDave Kreskowiak16-Feb-07 1:59 
GeneralRe: Running regsvr32.exe from CreateProcess Pin
Barry True17-Feb-07 3:01
Barry True17-Feb-07 3:01 
GeneralRe: Running regsvr32.exe from CreateProcess Pin
Barry True17-Feb-07 3:02
Barry True17-Feb-07 3:02 
GeneralRe: Running regsvr32.exe from CreateProcess [modified] Pin
Barry True5-Mar-07 6:32
Barry True5-Mar-07 6:32 

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.