cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid query tree[300-33] the sql error 8180????????

former_member637595
Participant
0 Kudos

hi alll

when i click on my own creating form the above error is showing......?????

Private Sub drawform()

Dim oitem As SAPbouiCOM.Item

Dim oCombopptype As SAPbouiCOM.ComboBox

Try

LoadFromXML("PayPeriodMaster.srf")

Catch ex As Exception

MessageBox.Show(ex.Message)

End Try

oform = SBO_Application.Forms.Item("MPPeriod")

''''''' combo for code

oitem = oform.Items.Item("txtcode")

oCodetext = oitem.Specific

'AddpayCodeCombo(cmbcode)

'''''''''combo for pay type

oitem = oform.Items.Item("cmbppt")

oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Employee")

oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Labour")

oCombopptype = oitem.Specific

''''''' notes''''''''''''

oitem = oform.Items.Item("txtNotes")

noteedittext = oitem.Specific

'''''''' startdate

oitem = oform.Items.Item("txtSDate")

starD = oitem.Specific

''''''''''end date

oitem = oform.Items.Item("txtEDate")

endD = oitem.Specific

''''''''''days in period

oitem = oform.Items.Item("txtDPrd")

daystext = oitem.Specific

'''''''''''' working days

oitem = oform.Items.Item("txtWDays")

worktext = oitem.Specific

End Sub

could u help me any body......

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

i think that error is not because of the code you have pasted here.

it seems like there are some sql queries in your code.

Please check them in Query analyzer with some test values.

if this queries are running properly then the problem might be at concatenating the values (while building the query)

and there are some problems in your code too i.e

HERE

oitem = oform.Items.Item("cmbppt")

oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Employee")

oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Labour")

oCombopptype = oitem.Specific

IT SHOULD BE LIKE THIS

oitem = oform.Items.Item("cmbppt")

oCombopptype = oitem.Specific

//Valid values should be different

oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Employee")

oCombopptype.ValidValues.Add(CStr(4), "Labour")-- GIVE Different valid value

Hope it helps you

Regards

Vishnu

Answers (0)