Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I love this site! It's so nice to know that there are so many people out there who are willing to share their knowledge..."

Geography

Where in the world do Tek-Tips members come from?

vb 2005&SQL 2005: show results in Query Builder but not in preview of datagridview

kakakaka77 (TechnicalUser)
27 Jul 12 18:24
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!

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close