473,394 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Database Query

2
Hi i'm trying to create a code that searches for a word i type in, in a table. kind of like a parameter query but in a visual basic code.

if i have the following entries in a column called 'ProductName':
-Poster Paint
-Poster Paper Rolls
-Pink Paper

and i type in the word 'poster' in a textbox, click a command button to search the fields then entries 1 and 2 should be displayed.

what would be the best way or visual basic code to use?

another question, is there a way to look at a select query in visual basic code?
Feb 29 '08 #1
1 1034
lotus18
866 512MB
Hi i'm trying to create a code that searches for a word i type in, in a table. kind of like a parameter query but in a visual basic code.

if i have the following entries in a column called 'ProductName':
-Poster Paint
-Poster Paper Rolls
-Pink Paper

and i type in the word 'poster' in a textbox, click a command button to search the fields then entries 1 and 2 should be displayed.

what would be the best way or visual basic code to use?

another question, is there a way to look at a select query in visual basic code?
Expand|Select|Wrap|Line Numbers
  1. rs.Open "Select * From <TableName> Where ProductName Like '%" & Text1.Text & "%'", con,1,1
Where rs is the recordset, and con is the active connection. BTW, just replace <TableName> with the name of your table.

Rey Sean
Mar 1 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Gershon | last post by:
I have an ASP.NET/C# web application running against a SQL Server database using ADO.NET. Whenever there is a long-running database query, the web application hangs until the database query is...
3
by: Rob Venable | last post by:
Hi everyone, Can anyone see a problem with this code. I'm kinda new to asp.net and I'm having a problem populating a drop down list with a database query. The results of my query populate the list...
2
by: Mejmeyster | last post by:
Hi Everyone! I've been desperately trying to prepare a database query from Access to Excel. The problem is, when I ask MS Query to import data from more than one table, no data is importing, only...
0
by: simba | last post by:
Hello, I am having trouble executing more than one database query in a JSP page. The first query executes fine but it seems to skip by the second one. Any ideas why? Thanks
5
by: Eglute | last post by:
Hello I want to show the results of database query in Visual basic. Do you know how to do this? I want to show the results in objects such as label or text box. Please help me. My code is: Dim db...
1
by: Eglute | last post by:
Hello I want to show the results of MS Access database query in Visual basic. Do you know how to do this? I want to show the results in objects such as label or text box. Please help me. My code is:...
1
by: jesmi | last post by:
my code is: U]employee.cfm <html> <head> <title>Employee List</title> </head> <body> <h1>Employee List</h1>
1
by: obrienkev | last post by:
Hi, I want to mark the CheckListBox items as Checked based on a database query. So the CheckListBox items should be checked if each item matches fundsAffected field from the below query... ...
2
by: secutos | last post by:
I have the option of storing data online as text files, or storing data online in a MySQL database. If the information is stored as a text file, all I have to do is a HttpWebRequest to the text file...
3
by: benicio | last post by:
Database query failed: Unknown column 'subj' in 'where clause' What does this error mean and how should it be fix?
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.