kakakaka77
Technical User
Hi, everyone:
I am writing a little window application to show the result from a sql database table.
In Query Builder, the sql query did return the results, but when I run it in the application is not show any record. I also check the preview of the tableadpter, it is not showing either.
FillByStartItemH In Query Builder:
Here is my codes:
SELECT hhhist, hhvend, hdpart, hddesc
FROM vw_hpohd_hpodt
WHERE (hhhist = 'H') AND (hhvend = ?) AND (hdpart LIKE ? + '%')
Enter "1" for hhvend and 9 for hdpart, it DID show me all records stars with 9 for vendorID 1
But when I run this is my application
Me.Vw_hpohd_hpodtTableAdapter.FillByStartItemH(Me.Vista_GSDataSet3.vw_hpohd_hpodt, txtVendor.Text, TextBox1.Text)
I have put "1" in txtVendor textbox and put "9" in textbox1. it is not returning any row in the datagridview.
PS: one thing I have found is the in datagridview preview window (see attachment1), the type is "ansistring", but the type of hhvend and hdpart are string field in the database. Is that the problem? Is there a way I can convert the text in textbox to AnsiString?
Thank you!
I am writing a little window application to show the result from a sql database table.
In Query Builder, the sql query did return the results, but when I run it in the application is not show any record. I also check the preview of the tableadpter, it is not showing either.
FillByStartItemH In Query Builder:
Here is my codes:
SELECT hhhist, hhvend, hdpart, hddesc
FROM vw_hpohd_hpodt
WHERE (hhhist = 'H') AND (hhvend = ?) AND (hdpart LIKE ? + '%')
Enter "1" for hhvend and 9 for hdpart, it DID show me all records stars with 9 for vendorID 1
But when I run this is my application
Me.Vw_hpohd_hpodtTableAdapter.FillByStartItemH(Me.Vista_GSDataSet3.vw_hpohd_hpodt, txtVendor.Text, TextBox1.Text)
I have put "1" in txtVendor textbox and put "9" in textbox1. it is not returning any row in the datagridview.
PS: one thing I have found is the in datagridview preview window (see attachment1), the type is "ansistring", but the type of hhvend and hdpart are string field in the database. Is that the problem? Is there a way I can convert the text in textbox to AnsiString?
Thank you!