Solved

SQL Reader

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

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

860 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