asc()

  • Thread starter Thread starter Raymond Chiu
  • Start date Start date
R

Raymond Chiu

datarows=me.dataset2.tables(0).select("(asc(substring(intpartno,1,1))-64)="
& cint(me.dropdownlist1.selectedvalue))

It promp the error and I find that asc() does not work.
Is it a valid function?
Any other function can replace asc()?

Please help.

Thanks,
 
datarows=me.dataset2.tables(0).select("(Convert(substring(intpartno,1,1), 'System.Int32)-64)="
& cint(me.dropdownlist1.selectedvalue))

does this work ?

Kalpesh
 
Oops, I missed a closing quote

datarows=me.dataset2.tables(0).select("(Convert(substring(intpartno,1,1), 'System.Int32')-64)="
& cint(me.dropdownlist1.selectedvalue))

Kalpesh
 
It still does not work in my case.

Actually my command is as follows:
datarows = Me.DataSet2.Tables(0).Select(" custcode='" & Me.TextBox1.Text &
"' and (Convert(Substring(intpartno, 1, 1),'System.Int32')-64) = " &
CInt(Me.DropDownList2.SelectedValue))

I am not sure the tables(0) does contain "custcode" and "intpartno".
As Dataset2 is coming from the command2 which contain three linked tables.


Me.OracleDataAdapter1.SelectCommand = Me.OracleCommand2
Me.OracleDataAdapter1.Fill(Me.DataSet2)
 
Hi Raymond,

The most easy way for me is always to test this kind of situations putting
an hard identifier in the selectstring.

And when it than works, I change that afterwards for datafields.

I hope this helps?

Cor
 
Back
Top