Question Locked

vb and mysql reporting using cristal report

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

i have a problem here..

i have run my system but t shows error 20515 when i want to preview it..

i'm using this code

With rpt_report
.Connect = "DSN=" + ODBCName + "; UID=" + ODBCUser + ";PWD=" + ODBCPass
.ReportFileName = App.Path & "\Report\reorderinv.rpt"
.SelectionFormula = "{PURCHASE.ORDERNO} =( & Text8.text & ) "
.Destination = 0
.Action = 1
End With
Exit Sub
'errRpt:

help me please

rgds,
vya

4 replies

by tony hopkinson

SelectionFormula = "{PURCHASE.ORDERNO} =( & Text8.text & ) "

& is + for strings and strings are expected to be inside single quotes so above should be

SelectionFormula = "{PURCHASE.ORDERNO} =('" & Text8.text & "') "

Can't confirm because I don't use it, oh and I'd be thinking sql injection attack...

This discussion is closed to new replies.