Click here to Skip to main content
15,908,015 members

Comments by Justin Jendrick Nocillado (Top 6 by date)

Justin Jendrick Nocillado 11-Jul-13 22:19pm View    
It does work when i try select 1 table only..


Dim MyCommand As New SqlCommand()
Dim myDA As New SqlDataAdapter()
Dim myDS As New AGprint() 'The DataSet you created.
Try
MyCommand.Connection = cn
MyCommand.CommandText = "SELECT * FROM actualguesting where foilionum=" + mainForm.folioid
MyCommand.CommandType = CommandType.Text
myDA.SelectCommand = MyCommand
myDA.Fill(myDS, "actualguesting")
myDS.EnforceConstraints = False
Dim rpt As New AGprintreceiptDC() 'The report you created.
rpt.SetDataSource(myDS)
CrystalReportViewer1.ReportSource = rpt
Justin Jendrick Nocillado 30-May-13 4:25am View    
winforms - VB .net - VS2010
Justin Jendrick Nocillado 15-May-13 2:48am View    
If srchtbl.Item(1, j).Value = ComboBox1.Text Then <- here
Justin Jendrick Nocillado 30-Apr-13 10:53am View    
Get it. Thanks for helping :)
Justin Jendrick Nocillado 29-Apr-13 11:04am View    
I'll try that later.Thanks

----

Problem Solved! Thanks Matej and Keith.

BTW, is this correct? to avoid sql injections?

sqlCommand.CommandText = "Select " + userTemplateColumn + " from " + userTable + " where username='" + registration.txtusername.Text + "'"