Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 12-09-2008, 01:45 AM   #1
Solid State Member
Join Date: Sep 2008
Posts: 10
Default VB6 Help

Just want you guys to check what's wrong with ths SQL Code. I was using VB6 and Microsoft Access as the database. I've used a DataGrid to check if there was a result but nothing appears on the datagrid even though I'm very sure that there should have.I didn't have to explain what the code means I'm sure guys will immediately have knowledge of it.

poproDB.Open "SELECT * FROM payment WHERE pono = ' " & txtPONo & " ' AND cleared = '" & "yes" & "' "

And I'll be definitely be back for more questions cause I'm working on a project. Thanks in advance for your help.

TroubleShooter is offline   Reply With Quote
Old 12-10-2008, 02:35 PM   #2
Daemon Poster
xtremezx2's Avatar
Join Date: Sep 2006
Posts: 915
Default Re: VB6 Help

I'm going to assume txtPONo is a textbox and not just a variable.

poproDB.Open "SELECT * FROM payment WHERE pono = ' " & txtPONo.Text & "' AND cleared = '" & "yes" & "'"

xtremezx2 is offline   Reply With Quote
Old 12-10-2008, 02:49 PM   #3
Fully Optimized
UK31337's Avatar
Join Date: Feb 2005
Posts: 2,776
Default Re: VB6 Help

  1. Are you sure that SQL statement is being parsed properly?
  2. Where's the code to actually bind values to the DataGrid or add anything to the DataGrid at all?
  3. How are you storing your recordset?

Me confused.
Master of common sense. If you don't like it, stop reading.
UK31337 is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 08:08 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0