Solved

SQL Reader

Posted on 2006-10-27
2
136 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

813 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

14 Experts available now in Live!

Get 1:1 Help Now