Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
SQL
Dim prdate As Date = Format(Check_Date.Value, "dd/MM/yyyy")
       '
       cmd.CommandText = "SELECT  DISTINCT GLMAST.fglhead,MAINFILE.facno FROM MAINFILE INNER JOIN  GLMAST ON GLMAST.fglcode like  LEFT(MAINFILE.facno,9) and   GLMAST.fglhead = '" & ComboBox2.Text & "' "
      
         
       With cmd
           dr = .ExecuteReader
       End With

I AM TRYING TO PRINT
fglhead facno
xxxxxxx 123456
this is required output..and i taken crystall report field as usual in that only
fglhead facno
xxxxxxx||this field not displaying
Posted
Comments
sp_suresh 26-Nov-14 8:07am    
1. please check parameters passed by you with its Type.
2. Also filter data acc to table GLMAST
lakshjoshi 26-Nov-14 8:17am    
how to filter data acc to table GLMAST
Richard Deeming 26-Nov-14 8:41am    
Your code is vulnerable to SQL Injection[^].

NEVER use string concatenation to build a SQL query. ALWAYS use a parameterized query.
lakshjoshi 26-Nov-14 8:45am    
oh!ok...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900