Solved

SQL Reader

Posted on 2006-10-27
2
134 Views
Last Modified: 2010-04-30
i am trying to make that it only reads the rows where "pri_spray" = true and "row_name" = form1.selected_row

                cmd.CommandText = "SELECT * FROM spray_db where pri_spray = true, row_name=" & form1.selected_row

thx
0
Comment
Question by:mSchmidt
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 17818061
if the fields pri_spray and row_name are string data type (varchar?), you need single quotes:
                cmd.CommandText = "SELECT * FROM spray_db WHERE pri_spray = 'true' AND row_name='" & form1.selected_row & "' "
0
 

Author Comment

by:mSchmidt
ID: 17818070
doh thx, just couldn't remeber how it was
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now